Closed dmitshur closed 6 years ago
LGTM, should merge pending Travis build confirmation.
It fails to compile:
$ go test ./v4.5-core/gl
# github.com/go-gl/gl/v4.5-core/gl
v4.5-core/gl/package.go:5490: cannot convert sync (type uintptr) to type C.GLsync
v4.5-core/gl/package.go:5662: cannot convert ret (type C.GLsync) to type uintptr
v4.5-core/gl/package.go:5766: cannot convert sync (type uintptr) to type C.GLsync
v4.5-core/gl/package.go:5972: cannot convert ret (type C.GLsync) to type uintptr
v4.5-core/gl/package.go:6480: cannot convert sync (type uintptr) to type C.GLsync
v4.5-core/gl/package.go:6803: cannot convert sync (type uintptr) to type C.GLsync
v4.5-core/gl/package.go:8205: cannot convert sync (type uintptr) to type C.GLsync
Alas. Go is unhappy converting between uintptr
and a C pointer type. Which is a little strange because we're already doing the same thing for GLhandleARB
which maps to void *
on Mac OS. Maybe void*
is special compared to an anonymous struct pointer?
It might be safe to do a just-in-time conversion from uintptr
to unsafe.Pointer
(but the GC may still catch this at exactly the wrong moment)? Alternatively we could change the C function signature and cast the value there, though that's not yet well supported by glow.
Dropping this PR given we implemented a slightly different fix in Glow.
Regenerate all bindings after generator change in go-gl/glow#79.
Done with latest version of glow:
Resolves #71.
/cc @errcw @dominikh