-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automagic debug binding #32
Comments
I was going to make a global io.Writer and change all the Printf to Fprintfs as well. |
I started writing a simple tracing package implementation in a branch and encountered a few roadblocks:
|
David Crawshaw just finish one with go.mobile, it uses build tags instead which i think is probably better than switching packages like I was doing. https://code.google.com/p/go/source/browse/?repo=mobile#hg%2Fgl However I would not do the defer()'ed printing. If a gl call causes your program to die immediately for whatever reason you will not get the print outs. This has happened to me with bad drivers, bad stream sync in x11, and bad error handling in the drivers. For instance I was also intending to use 3rd party tools like |
Also David doesn't have a choice with GLES 2.0 but ARB_debug_output is a absurdly more useful than glError() given the async nature of opengl. No ARB_debug_output on OS X though... Apple really dropping the ball on opengl lately it requires zero hardware support. |
Not really an issue, just another idea dump.
I have found this debug binding to be very useful, you guys may want to implement something similar.
https://github.com/bryanturley/gl/blob/master/dbg/gl.go#L31
It doesn't do any asm/cgo directly it calls the first binding so that it can be mixed with things that don't use it.
That was a first attempt, I need to make changes lower to make it generate better debug information.
Took me about 30minutes to add it, all the heavy lifting is already done since you are generating funcs already.
This style of debug package could replace the need for things like
https://code.google.com/p/glintercept/
The text was updated successfully, but these errors were encountered: