go-gl-legacy / gl

Go bindings for OpenGL
BSD 3-Clause "New" or "Revised" License
342 stars 52 forks source link

Implement bindings for debug output feature #137

Closed kiryl closed 10 years ago

kiryl commented 10 years ago

This patch implements ARB_debug_output/KHR_debug. It's was an extension before and now it's in core since OpenGL 4.3.

Interface is not totally match C version:

Any suggestions about interface or implementation are welcome.

pwaller commented 10 years ago

Thanks. Note that the tests failed: you need to run go fmt.

kiryl commented 10 years ago

I've fixed formatting. But tests still fail. It loooks like glew is too old there. KHR_debug was added as part of OpenGL 4.3 support in glew 1.9.0. Any suggestion how we should deal with this? Can we bump minimum required version of glew to 1.9.0?

pwaller commented 10 years ago

Ah, unfortunate. I'm not a huge fan of bumping the required glew version such a long distance (it's currently 1.5) since really it should "Just work" for people. The best I can immediately think of is to make a more recent glew branch, but I'm open to suggestions.

kiryl commented 10 years ago

I've reimplemented it on top of ARB_debug_output instead of KHR_debug. It seems glew provides ARB_debug_output since 1.5.6.

I also had to workaround GLchar* vs. char* type problem in different glew version.

Does it look okay for you?

kiryl commented 10 years ago

ping?

pwaller commented 10 years ago

Thanks for the contribution and thanks for the ping! Apologies for not getting back sooner, it fell off my radar.

Any chance you could add an example of its use to go-gl/examples?