x/mobile/gl: Fix arguments passed to glBufferData from BufferInit
Before this CL, BufferInit always causes INVALID_ENUM error because 0 (a2) is always passed to 'usage' argument of glBufferData. This CL fixes removes a2, shifts a3 to a2, and adds parg as null pointer explicitly. Fixes golang/go#14403 Change-Id: I11109c983316f5975a79f42dc51d7a180e222b91 Reviewed-on: https://go-review.googlesource.com/19703 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
ed70d674be
commit
c1fbaaac1c
4
gl/gl.go
4
gl/gl.go
@ -166,9 +166,9 @@ func (ctx *context) BufferInit(target Enum, size int, usage Enum) {
|
|||||||
fn: glfnBufferData,
|
fn: glfnBufferData,
|
||||||
a0: target.c(),
|
a0: target.c(),
|
||||||
a1: uintptr(size),
|
a1: uintptr(size),
|
||||||
a2: 0,
|
a2: usage.c(),
|
||||||
a3: usage.c(),
|
|
||||||
},
|
},
|
||||||
|
parg: unsafe.Pointer(nil),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -847,9 +847,9 @@ func (ctx *context) BufferInit(target Enum, size int, usage Enum) {
|
|||||||
fn: glfnBufferData,
|
fn: glfnBufferData,
|
||||||
a0: target.c(),
|
a0: target.c(),
|
||||||
a1: uintptr(size),
|
a1: uintptr(size),
|
||||||
a2: 0,
|
a2: usage.c(),
|
||||||
a3: usage.c(),
|
|
||||||
},
|
},
|
||||||
|
parg: unsafe.Pointer(nil),
|
||||||
blocking: true})
|
blocking: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user