Skip to content

Commit a98beac

Browse files
committed
Fix handling of glbase.Sync.
Fixes #97.
1 parent e3d7ffd commit a98beac

File tree

13 files changed

+79
-72
lines changed

13 files changed

+79
-72
lines changed

gl/3.2compat/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5089,7 +5089,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
50895089

50905090
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetSynciv.xml
50915091
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5092-
C.gl3_2compat_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5092+
C.gl3_2compat_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
50935093
}
50945094

50955095
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetInteger64v.xml
@@ -5099,30 +5099,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
50995099

51005100
// https://www.opengl.org/sdk/docs/man3/xhtml/glWaitSync.xml
51015101
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5102-
C.gl3_2compat_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5102+
C.gl3_2compat_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51035103
}
51045104

51055105
// https://www.opengl.org/sdk/docs/man3/xhtml/glClientWaitSync.xml
51065106
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5107-
glresult := C.gl3_2compat_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5107+
glresult := C.gl3_2compat_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51085108
return glbase.Enum(glresult)
51095109
}
51105110

51115111
// https://www.opengl.org/sdk/docs/man3/xhtml/glDeleteSync.xml
51125112
func (gl *GL) DeleteSync(sync glbase.Sync) {
5113-
C.gl3_2compat_glDeleteSync(gl.funcs, C.GLsync(sync))
5113+
C.gl3_2compat_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
51145114
}
51155115

51165116
// https://www.opengl.org/sdk/docs/man3/xhtml/glIsSync.xml
51175117
func (gl *GL) IsSync(sync glbase.Sync) bool {
5118-
glresult := C.gl3_2compat_glIsSync(gl.funcs, C.GLsync(sync))
5118+
glresult := C.gl3_2compat_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
51195119
return *(*bool)(unsafe.Pointer(&glresult))
51205120
}
51215121

51225122
// https://www.opengl.org/sdk/docs/man3/xhtml/glFenceSync.xml
51235123
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
51245124
glresult := C.gl3_2compat_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5125-
return glbase.Sync(glresult)
5125+
return glbase.Sync(unsafe.Pointer(glresult))
51265126
}
51275127

51285128
// https://www.opengl.org/sdk/docs/man3/xhtml/glProvokingVertex.xml

gl/3.2core/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -4634,7 +4634,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
46344634

46354635
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetSynciv.xml
46364636
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
4637-
C.gl3_2core_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
4637+
C.gl3_2core_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
46384638
}
46394639

46404640
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetInteger64v.xml
@@ -4644,30 +4644,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
46444644

46454645
// https://www.opengl.org/sdk/docs/man3/xhtml/glWaitSync.xml
46464646
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
4647-
C.gl3_2core_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
4647+
C.gl3_2core_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
46484648
}
46494649

46504650
// https://www.opengl.org/sdk/docs/man3/xhtml/glClientWaitSync.xml
46514651
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
4652-
glresult := C.gl3_2core_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
4652+
glresult := C.gl3_2core_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
46534653
return glbase.Enum(glresult)
46544654
}
46554655

46564656
// https://www.opengl.org/sdk/docs/man3/xhtml/glDeleteSync.xml
46574657
func (gl *GL) DeleteSync(sync glbase.Sync) {
4658-
C.gl3_2core_glDeleteSync(gl.funcs, C.GLsync(sync))
4658+
C.gl3_2core_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
46594659
}
46604660

46614661
// https://www.opengl.org/sdk/docs/man3/xhtml/glIsSync.xml
46624662
func (gl *GL) IsSync(sync glbase.Sync) bool {
4663-
glresult := C.gl3_2core_glIsSync(gl.funcs, C.GLsync(sync))
4663+
glresult := C.gl3_2core_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
46644664
return *(*bool)(unsafe.Pointer(&glresult))
46654665
}
46664666

46674667
// https://www.opengl.org/sdk/docs/man3/xhtml/glFenceSync.xml
46684668
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
46694669
glresult := C.gl3_2core_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
4670-
return glbase.Sync(glresult)
4670+
return glbase.Sync(unsafe.Pointer(glresult))
46714671
}
46724672

46734673
// https://www.opengl.org/sdk/docs/man3/xhtml/glProvokingVertex.xml

gl/3.3compat/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5105,7 +5105,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
51055105

51065106
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetSynciv.xml
51075107
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5108-
C.gl3_3compat_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5108+
C.gl3_3compat_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
51095109
}
51105110

51115111
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetInteger64v.xml
@@ -5115,30 +5115,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
51155115

51165116
// https://www.opengl.org/sdk/docs/man3/xhtml/glWaitSync.xml
51175117
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5118-
C.gl3_3compat_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5118+
C.gl3_3compat_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51195119
}
51205120

51215121
// https://www.opengl.org/sdk/docs/man3/xhtml/glClientWaitSync.xml
51225122
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5123-
glresult := C.gl3_3compat_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5123+
glresult := C.gl3_3compat_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51245124
return glbase.Enum(glresult)
51255125
}
51265126

51275127
// https://www.opengl.org/sdk/docs/man3/xhtml/glDeleteSync.xml
51285128
func (gl *GL) DeleteSync(sync glbase.Sync) {
5129-
C.gl3_3compat_glDeleteSync(gl.funcs, C.GLsync(sync))
5129+
C.gl3_3compat_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
51305130
}
51315131

51325132
// https://www.opengl.org/sdk/docs/man3/xhtml/glIsSync.xml
51335133
func (gl *GL) IsSync(sync glbase.Sync) bool {
5134-
glresult := C.gl3_3compat_glIsSync(gl.funcs, C.GLsync(sync))
5134+
glresult := C.gl3_3compat_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
51355135
return *(*bool)(unsafe.Pointer(&glresult))
51365136
}
51375137

51385138
// https://www.opengl.org/sdk/docs/man3/xhtml/glFenceSync.xml
51395139
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
51405140
glresult := C.gl3_3compat_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5141-
return glbase.Sync(glresult)
5141+
return glbase.Sync(unsafe.Pointer(glresult))
51425142
}
51435143

51445144
// https://www.opengl.org/sdk/docs/man3/xhtml/glProvokingVertex.xml

gl/3.3core/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5102,7 +5102,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
51025102

51035103
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetSynciv.xml
51045104
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5105-
C.gl3_3core_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5105+
C.gl3_3core_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
51065106
}
51075107

51085108
// https://www.opengl.org/sdk/docs/man3/xhtml/glGetInteger64v.xml
@@ -5112,30 +5112,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
51125112

51135113
// https://www.opengl.org/sdk/docs/man3/xhtml/glWaitSync.xml
51145114
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5115-
C.gl3_3core_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5115+
C.gl3_3core_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51165116
}
51175117

51185118
// https://www.opengl.org/sdk/docs/man3/xhtml/glClientWaitSync.xml
51195119
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5120-
glresult := C.gl3_3core_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5120+
glresult := C.gl3_3core_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51215121
return glbase.Enum(glresult)
51225122
}
51235123

51245124
// https://www.opengl.org/sdk/docs/man3/xhtml/glDeleteSync.xml
51255125
func (gl *GL) DeleteSync(sync glbase.Sync) {
5126-
C.gl3_3core_glDeleteSync(gl.funcs, C.GLsync(sync))
5126+
C.gl3_3core_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
51275127
}
51285128

51295129
// https://www.opengl.org/sdk/docs/man3/xhtml/glIsSync.xml
51305130
func (gl *GL) IsSync(sync glbase.Sync) bool {
5131-
glresult := C.gl3_3core_glIsSync(gl.funcs, C.GLsync(sync))
5131+
glresult := C.gl3_3core_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
51325132
return *(*bool)(unsafe.Pointer(&glresult))
51335133
}
51345134

51355135
// https://www.opengl.org/sdk/docs/man3/xhtml/glFenceSync.xml
51365136
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
51375137
glresult := C.gl3_3core_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5138-
return glbase.Sync(glresult)
5138+
return glbase.Sync(unsafe.Pointer(glresult))
51395139
}
51405140

51415141
// https://www.opengl.org/sdk/docs/man3/xhtml/glProvokingVertex.xml

gl/4.0compat/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5182,7 +5182,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
51825182

51835183
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSynciv.xml
51845184
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5185-
C.gl4_0compat_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5185+
C.gl4_0compat_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
51865186
}
51875187

51885188
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetInteger64v.xml
@@ -5192,30 +5192,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
51925192

51935193
// https://www.opengl.org/sdk/docs/man4/xhtml/glWaitSync.xml
51945194
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5195-
C.gl4_0compat_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5195+
C.gl4_0compat_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51965196
}
51975197

51985198
// https://www.opengl.org/sdk/docs/man4/xhtml/glClientWaitSync.xml
51995199
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5200-
glresult := C.gl4_0compat_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5200+
glresult := C.gl4_0compat_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
52015201
return glbase.Enum(glresult)
52025202
}
52035203

52045204
// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteSync.xml
52055205
func (gl *GL) DeleteSync(sync glbase.Sync) {
5206-
C.gl4_0compat_glDeleteSync(gl.funcs, C.GLsync(sync))
5206+
C.gl4_0compat_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52075207
}
52085208

52095209
// https://www.opengl.org/sdk/docs/man4/xhtml/glIsSync.xml
52105210
func (gl *GL) IsSync(sync glbase.Sync) bool {
5211-
glresult := C.gl4_0compat_glIsSync(gl.funcs, C.GLsync(sync))
5211+
glresult := C.gl4_0compat_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52125212
return *(*bool)(unsafe.Pointer(&glresult))
52135213
}
52145214

52155215
// https://www.opengl.org/sdk/docs/man4/xhtml/glFenceSync.xml
52165216
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
52175217
glresult := C.gl4_0compat_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5218-
return glbase.Sync(glresult)
5218+
return glbase.Sync(unsafe.Pointer(glresult))
52195219
}
52205220

52215221
// https://www.opengl.org/sdk/docs/man4/xhtml/glProvokingVertex.xml

gl/4.0core/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5179,7 +5179,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
51795179

51805180
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSynciv.xml
51815181
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5182-
C.gl4_0core_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5182+
C.gl4_0core_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
51835183
}
51845184

51855185
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetInteger64v.xml
@@ -5189,30 +5189,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
51895189

51905190
// https://www.opengl.org/sdk/docs/man4/xhtml/glWaitSync.xml
51915191
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5192-
C.gl4_0core_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5192+
C.gl4_0core_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51935193
}
51945194

51955195
// https://www.opengl.org/sdk/docs/man4/xhtml/glClientWaitSync.xml
51965196
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5197-
glresult := C.gl4_0core_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5197+
glresult := C.gl4_0core_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
51985198
return glbase.Enum(glresult)
51995199
}
52005200

52015201
// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteSync.xml
52025202
func (gl *GL) DeleteSync(sync glbase.Sync) {
5203-
C.gl4_0core_glDeleteSync(gl.funcs, C.GLsync(sync))
5203+
C.gl4_0core_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52045204
}
52055205

52065206
// https://www.opengl.org/sdk/docs/man4/xhtml/glIsSync.xml
52075207
func (gl *GL) IsSync(sync glbase.Sync) bool {
5208-
glresult := C.gl4_0core_glIsSync(gl.funcs, C.GLsync(sync))
5208+
glresult := C.gl4_0core_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52095209
return *(*bool)(unsafe.Pointer(&glresult))
52105210
}
52115211

52125212
// https://www.opengl.org/sdk/docs/man4/xhtml/glFenceSync.xml
52135213
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
52145214
glresult := C.gl4_0core_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5215-
return glbase.Sync(glresult)
5215+
return glbase.Sync(unsafe.Pointer(glresult))
52165216
}
52175217

52185218
// https://www.opengl.org/sdk/docs/man4/xhtml/glProvokingVertex.xml

gl/4.1compat/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
52185218

52195219
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSynciv.xml
52205220
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5221-
C.gl4_1compat_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5221+
C.gl4_1compat_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
52225222
}
52235223

52245224
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetInteger64v.xml
@@ -5228,30 +5228,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
52285228

52295229
// https://www.opengl.org/sdk/docs/man4/xhtml/glWaitSync.xml
52305230
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5231-
C.gl4_1compat_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5231+
C.gl4_1compat_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
52325232
}
52335233

52345234
// https://www.opengl.org/sdk/docs/man4/xhtml/glClientWaitSync.xml
52355235
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5236-
glresult := C.gl4_1compat_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5236+
glresult := C.gl4_1compat_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
52375237
return glbase.Enum(glresult)
52385238
}
52395239

52405240
// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteSync.xml
52415241
func (gl *GL) DeleteSync(sync glbase.Sync) {
5242-
C.gl4_1compat_glDeleteSync(gl.funcs, C.GLsync(sync))
5242+
C.gl4_1compat_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52435243
}
52445244

52455245
// https://www.opengl.org/sdk/docs/man4/xhtml/glIsSync.xml
52465246
func (gl *GL) IsSync(sync glbase.Sync) bool {
5247-
glresult := C.gl4_1compat_glIsSync(gl.funcs, C.GLsync(sync))
5247+
glresult := C.gl4_1compat_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52485248
return *(*bool)(unsafe.Pointer(&glresult))
52495249
}
52505250

52515251
// https://www.opengl.org/sdk/docs/man4/xhtml/glFenceSync.xml
52525252
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
52535253
glresult := C.gl4_1compat_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5254-
return glbase.Sync(glresult)
5254+
return glbase.Sync(unsafe.Pointer(glresult))
52555255
}
52565256

52575257
// https://www.opengl.org/sdk/docs/man4/xhtml/glProvokingVertex.xml

gl/4.1core/gl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5215,7 +5215,7 @@ func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat
52155215

52165216
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSynciv.xml
52175217
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
5218-
C.gl4_1core_glGetSynciv(gl.funcs, C.GLsync(sync), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
5218+
C.gl4_1core_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
52195219
}
52205220

52215221
// https://www.opengl.org/sdk/docs/man4/xhtml/glGetInteger64v.xml
@@ -5225,30 +5225,30 @@ func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
52255225

52265226
// https://www.opengl.org/sdk/docs/man4/xhtml/glWaitSync.xml
52275227
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
5228-
C.gl4_1core_glWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5228+
C.gl4_1core_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
52295229
}
52305230

52315231
// https://www.opengl.org/sdk/docs/man4/xhtml/glClientWaitSync.xml
52325232
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
5233-
glresult := C.gl4_1core_glClientWaitSync(gl.funcs, C.GLsync(sync), C.GLbitfield(flags), C.GLuint64(timeout))
5233+
glresult := C.gl4_1core_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
52345234
return glbase.Enum(glresult)
52355235
}
52365236

52375237
// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteSync.xml
52385238
func (gl *GL) DeleteSync(sync glbase.Sync) {
5239-
C.gl4_1core_glDeleteSync(gl.funcs, C.GLsync(sync))
5239+
C.gl4_1core_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52405240
}
52415241

52425242
// https://www.opengl.org/sdk/docs/man4/xhtml/glIsSync.xml
52435243
func (gl *GL) IsSync(sync glbase.Sync) bool {
5244-
glresult := C.gl4_1core_glIsSync(gl.funcs, C.GLsync(sync))
5244+
glresult := C.gl4_1core_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
52455245
return *(*bool)(unsafe.Pointer(&glresult))
52465246
}
52475247

52485248
// https://www.opengl.org/sdk/docs/man4/xhtml/glFenceSync.xml
52495249
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
52505250
glresult := C.gl4_1core_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
5251-
return glbase.Sync(glresult)
5251+
return glbase.Sync(unsafe.Pointer(glresult))
52525252
}
52535253

52545254
// https://www.opengl.org/sdk/docs/man4/xhtml/glProvokingVertex.xml

0 commit comments

Comments
 (0)