go-gl / gl

Go bindings for OpenGL (generated via glow)
MIT License
1.07k stars 74 forks source link

OpenGL 4.6 support #88

Closed kjozic closed 6 years ago

kjozic commented 6 years ago

When can we expect support for OpenGL 4.6?

errcw commented 6 years ago

It should be straightforward to generate the new bindings. I'll try and make time this week to do it.

errcw commented 6 years ago

It should be straightforward to generate the new bindings. I'll try and make time this week to do it.

kjozic commented 6 years ago

When I try to generate the new bindings using glow (glow generate -out=./v4.6-core/gl/ -api=gl -version=4.6 -profile=core -xml=../glow/xml/) following error occurs: 2017/11/05 12:32:03 unable to generate package: &{gl 4.6 core /home/kreso/golang/src/github.com/go-gl/glow/tmpl <nil> <nil> false}

dmitshur commented 6 years ago

That error happens on this line:

https://github.com/go-gl/glow/blob/75d9c6716e5939e941a3fc5e2d6afaf36f52514d/main.go#L123

If it happens, that means spec.HasPackage(packageSpec) was not true for any of the specs in the XML directory.

dmitshur commented 6 years ago

It looks like we need to update the contents of the XML directory with the latest XML specifications. The ones currently there now only have 4.5, not 4.6.

@errcw Is it documented anywhere how to update the contents of the XML directory? I can't find it (not in the README of the repo, nor in the README within the xml directory, nor in wiki).

Edit: I found there's a glow download command for it.

kjozic commented 6 years ago

I found the files in the following locations: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/glx.xml https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/wgl.xml https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/egl.xml

Glow successfully generates OpenGL 4.6 core and compatibility bindings using these files.

dmitshur commented 6 years ago

We need to decide to how to proceed in https://github.com/go-gl/glow/issues/90 to make progress on this issue.

dmitshur commented 6 years ago

Now that https://github.com/go-gl/glow/issues/90 is resolved, we can proceed here.

dmitshur commented 6 years ago

I've created PR #92 that'll resolve this issue (it's an updated version of #90).