2
0
mirror of synced 2025-02-22 06:28:04 +00:00

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:
Hajime Hoshi 2016-02-19 14:31:13 +09:00 committed by David Crawshaw
parent ed70d674be
commit c1fbaaac1c
2 changed files with 4 additions and 4 deletions

View File

@ -166,9 +166,9 @@ func (ctx *context) BufferInit(target Enum, size int, usage Enum) {
fn: glfnBufferData,
a0: target.c(),
a1: uintptr(size),
a2: 0,
a3: usage.c(),
a2: usage.c(),
},
parg: unsafe.Pointer(nil),
})
}

View File

@ -847,9 +847,9 @@ func (ctx *context) BufferInit(target Enum, size int, usage Enum) {
fn: glfnBufferData,
a0: target.c(),
a1: uintptr(size),
a2: 0,
a3: usage.c(),
a2: usage.c(),
},
parg: unsafe.Pointer(nil),
blocking: true})
}