OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition
by Dave Shreiner, Graham Sellers, John M. Kessenich, Bill M. Licea-Kane
Creating a Debug Context
To get the most from OpenGL’s debugging facilities, it is necessary to create a debug context, which implies that you need control over the flags and parameters used to create the context. Context creation is a platform-specific task that is often handled by a wrapper layer such as GLUT. Modern implementations of GLUT (such as FreeGLUT, which we use in many of this book’s samples) include the function glutInitContextFlags(). This function takes a number of flags that can be used to control how contexts subsequently created behave. One of these flags is GLUT_DEBUG, which will enable a debug context. Many other platform abstraction layers have similar mechanisms. If you are not using an abstraction layer, then you will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access