I’ve just been playing around with GL_ARB_debug_output, a new extension introduced with OpenGL 4.3. This extension adds debugging capabilities to OpenGL, e.g. allowing you to have a callback fired by the OpenGL implementation that’ll inform you upon errors or even (heavily depending on the IHV) gives performance hints.

I wrote a small sample (in Delphi) that demonstrates this new functionality. It creates an OpenGL 4.3 forward compatible context (no more legacy stuff) with debugging capabilites and displays debug messages from your OpenGL driver.

It’s a pretty neat feature, and something that OpenGL has been missing for a long time. So from now on, instead of having to poll via glError, you can have the driver inform you when something is not correct and (even better) tell you about your performance caveats.

You can grab the source from the gldebug folder in my GIT repository over at bitbucket. I plan on adding OpenGL demos (with source) for some of the newer OpenGL features to that repository from time to time.