/*
* Create the pbuffer and return a GLXPbufferSGIX handle.
+ *
+ * We loop over a list of fbconfigs trying to create
+ * a pixel buffer. We return the first pixel buffer which we successfully
+ * create.
*/
static GLXPbufferSGIX
MakePbuffer( Display *dpy, int screen, int width, int height )
{
#define NUM_FB_CONFIGS 4
- char fbString[NUM_FB_CONFIGS][100] = {
+ const char fbString[NUM_FB_CONFIGS][100] = {
"Single Buffered, depth buffer",
"Double Buffered, depth buffer",
"Single Buffered, no depth buffer",
/*
- * Create a pixel buffer. We loop over the list of fbconfigs trying to create
- * a pixel buffer. We return the first pixel buffer which we successfully
- * create. This function hides the ugliness of dealing with BadAlloc X
- * protocol errors.
+ * Create a Pbuffer. Use an X error handler to deal with potential
+ * BadAlloc errors.
*
* Input: dpy - the X display
* fbConfig - an FBConfig as returned by glXChooseFBConfigSGIX().