Comments on: Your Argument Is Invalid: Improving OpenGL error messages Err, #a, not ##a. Err, #a, not ##a.

]]>
By: Ray Ratelis/2011/06/23/improving-opengl-error-messages/#comment-6306 Ray Ratelis Sat, 25 Jun 2011 01:17:13 +0000 }
}

To use it:

GLERRCHECK(glEnable(GL_DEPTH));

It’s not the prettiest code in the world, but it gets the job done.

]]>
By: Graham Sellers/2011/06/23/improving-opengl-error-messages/#comment-6300 Graham Sellers Fri, 24 Jun 2011 21:06:07 +0000 Hunh; I haven't had any problems with callstacks in the AMD drivers. There are certainly several mysterious atioglxx.dll frames above my callback, but I've always been able to pop right back up to the offending API call in my application. Maybe I just got lucky... Hey, while we have you here, can you settle our confusion and give some official word as to when GL_ARB_Debug_output support will/did appear in the official Catalyst drivers? Hunh; I haven’t had any problems with callstacks in the AMD drivers. There are certainly several mysterious atioglxx.dll frames above my callback, but I’ve always been able to pop right back up to the offending API call in my application. Maybe I just got lucky…

Hey, while we have you here, can you settle our confusion and give some official word as to when GL_ARB_Debug_output support will/did appear in the official Catalyst drivers?

]]>
By: Cort Stratton/2011/06/23/improving-opengl-error-messages/#comment-6295 Cort Stratton Fri, 24 Jun 2011 18:20:50 +0000 That's an interesting extension that I haven't read about. What we've always done was for the debug version, surround all gl functions with a macro that basically called glGetError() after the call and recorded an error with the file/line number if there was one. Then in the release version of the code, the macro can just call the function and nothing else. Of course, retrofitting this into code that was already written would be annoying, but doing it from the start was useful. That’s an interesting extension that I haven’t read about.

What we’ve always done was for the debug version, surround all gl functions with a macro that basically called glGetError() after the call and recorded an error with the file/line number if there was one.
Then in the release version of the code, the macro can just call the function and nothing else.

Of course, retrofitting this into code that was already written would be annoying, but doing it from the start was useful.

]]>
By: Graham Sellers/2011/06/23/improving-opengl-error-messages/#comment-6291 Graham Sellers Fri, 24 Jun 2011 16:42:49 +0000 Really? I spent hours trying to get the ARB extension working with the 11.6 drivers, using multiple cards. No dice. Then I downgraded to 11.5a and everything worked fine. But hey, if it works for you, great! I only mentioned the AMD version of the extension as a reliable alternative for those who have similar problems, or who can't use the latest drivers for some reason. Really? I spent hours trying to get the ARB extension working with the 11.6 drivers, using multiple cards. No dice. Then I downgraded to 11.5a and everything worked fine. But hey, if it works for you, great! I only mentioned the AMD version of the extension as a reliable alternative for those who have similar problems, or who can’t use the latest drivers for some reason.

]]>
By: Cort Stratton/2011/06/23/improving-opengl-error-messages/#comment-6287 Cort Stratton Fri, 24 Jun 2011 16:10:11 +0000 (and by "last" I mean "latest", version 11.6... hopefully this is not the last driver they will ever put out... :p) (and by “last” I mean “latest”, version 11.6… hopefully this is not the last driver they will ever put out… :p)

]]>
By: Mikkel Gjoel/2011/06/23/improving-opengl-error-messages/#comment-6274 Mikkel Gjoel Fri, 24 Jun 2011 09:17:01 +0000 Nvidia bindless-vertex extensions grabbing GPU-addresses comes with a high risk of crashing your GPU while insistingly grabbing the wrong end of the stick during development. Running with a debug-context enables the driver to do more error-checking, before you crash. This is so astoundingly helpful, it needs a #win tag!

]]>
By: ptr/2011/06/23/improving-opengl-error-messages/#comment-6273 ptr Fri, 24 Jun 2011 08:59:08 +0000 Thank you! I didn't know about this before and it's going to save me a lot of time now that I do. Thank you! I didn’t know about this before and it’s going to save me a lot of time now that I do.

]]>
By: Viktor/2011/06/23/improving-opengl-error-messages/#comment-6270 Viktor Fri, 24 Jun 2011 08:35:51 +0000 I wish there was a way to use this extension on iOS/Android. I was implementing Shadow Mapping for Android and there were a lot of errors which I couldn't understand (though I eventually fixed them). I guess expecting mobile drivers to have such support is a little too much to ask. I wish there was a way to use this extension on iOS/Android. I was implementing Shadow Mapping for Android and there were a lot of errors which I couldn’t understand (though I eventually fixed them). I guess expecting mobile drivers to have such support is a little too much to ask.

]]>