An OpenGL program is a program linked with the OpenGL library, which is responsible for communicating with the graphics-card through the driver.
The traditional way to debug OpenGL is to insert glGetError() after each OpenGL function call as described in the previous blog post Debugging OpenGL part 1 – using glGetError(). Using glGetError is both cumbersome and time consuming. One of the new features in OpenGL 4.3 is the ability to get a callback whenever an OpenGL-related error occur. In this blog I’ll give a short introduction to how to use this new functionality using FreeGLUT and GLEW.
There exists quite a few platform abstraction libraries which allow you to create an OpenGL context. Most of these wrappers (FreeGLUT, GLFW, SDL) are small libraries that only supports the most basic stuff such as simple event loops and mouse/keyboard input. This is great if you want to create a 2D or 3D game without any advanced GUI elements. If you on the other hand want to create a program mixing GUI elements with 3D context (for instance a level editor or a model viewer) you need a more powerful library such as Qt (pronounced “cute”).