OpenGL Insights
Cover Table of Contents Pipeline Map Tips Contributors Reviews BibTeX Errata Code Blog Buy

VI Debugging and Profiling

We probably often underestimate how powerful the OpenGL API can be. However, programming is less about the result than the process to reach this result. The most impressive rendering is nothing but the end of a path that is, in a large part, debugging and profiling. Unfortunately, OpenGL doesn't have a great reputation on that side. Who really enjoys using glGetError?

This part of the OpenGL experience is now history since the release at SIGGRAPH 2010 of the GL ARB debug ouput extension that revolutionizes every day of an OpenGL programmer's life. This revolution is captured by António Ramires and Bruno Oliveira in their chapter "ARB debug output: OpenGL's Solutions for Desperate Developers," which shows every aspect of this extension, how to break the program when an OpenGL error occurs, and even opens on interesting debugging perspectives.

Profiling knew an earlier take-off in the world of OpenGL programming thanks to the release of GL EXT timer query in 2006, then standardized within OpenGL 3.3. Thanks to Christopher Lux and his chapter, "The OpenGL Timer Query," this primitive of OpenGL profiling won't hide any secrets any longer.

There are two kinds of profiler: the built-in and the external tools, which provide two different approaches to picture profiling. On one side, a profiler tightly connected to application designs and specific use-cases, on other side more generic tools that can embrace all sorts of scenarios and software. The first approach is perfectly reflected by Lionel Fuentes in his chapter "A Real-Time Profiling Tool," which deals with how a built-in real-time profiler can help the game programmer and also the artist creating game assets. Chris Dirks and Omar A. Rodriguez expose the second approach through their chapter "Browser Graphics Analysis and Optimizations," which discuss the utilization of Intel GPA to study WebGL performance.

Finally, Aleksandar Dimitrijević offers us two innovative profiling chapters, first introducing us to GPU P-States in his chapter "Performance State Tracking," where he calls our attention to how GPUs reach full speed and how this may affect our performance measurements. He backs his discussion with AMD and NVIDIA proprietary libraries. In his second chapter, he deals with the problem of GPU memory limits. OpenGL doesn't provide functionalities to determine the actual memory usage, but proprietary extensions provide the required information, and Dimitrijević helps us to go through them in his chapter "Monitoring Graphics Memory Usage."


33. ARB_debug_output: A Helping Hand for Desperate Developers
António Ramires Fernandes and Bruno Oliveira
OpenGL

...

code


34. The OpenGL Timer Query
Christopher Lux
OpenGL

...


35. A Real-Time Profiling Tool
Lionel Fuentes
OpenGL

...

code


36. Browser Graphics Analysis and Optimizations
Chris Dirks and Omar A. Rodriguez
WebGL

...


37. Performance State Tracking
Aleksandar Dimitrijevic
OpenGL

...

code


38. Monitoring Graphics Memory Usage
Aleksandar Dimitrijevic
OpenGL

...

code


Sections