Browse Source

respect old versions of glx.h a little better

David Rose 21 years ago
parent
commit
d165c1c369

+ 2 - 2
panda/src/glxdisplay/glxGraphicsBuffer.cxx

@@ -139,7 +139,7 @@ open_buffer() {
   int attrib_list[max_attrib_list];
   int n=0;
 
-#ifdef GLX_VERSION_1_3
+#ifdef HAVE_OFFICIAL_GLXFBCONFIG
   // The official GLX 1.3 version passes in the size in the attrib
   // list.
   attrib_list[n++] = GLX_PBUFFER_WIDTH;
@@ -153,7 +153,7 @@ open_buffer() {
                               attrib_list);
 
 #else
-  // The pre-GLX 1.3 version passed in the size in the parameter list.
+  // The SGI version passed in the size in the parameter list.
   nassertr(n < max_attrib_list, false);
   attrib_list[n] = (int)None;
   _pbuffer = glXCreateGLXPbufferSGIX(glxgsg->_display, glxgsg->_fbconfig,

+ 2 - 1
panda/src/glxdisplay/glxGraphicsPipe.h

@@ -44,6 +44,7 @@ typedef int XIC;
   // If the system glx version is at least 1.3, then we know we have
   // GLXFBConfig and GLXPbuffer.
   #define HAVE_GLXFBCONFIG
+  #define HAVE_OFFICIAL_GLXFBCONFIG
 #endif
 
 // This must be included after we have included glgsg.h (which
@@ -61,10 +62,10 @@ typedef int XIC;
   #define glXCreateNewContext glXCreateContextWithConfigSGIX
   #define glXGetVisualFromFBConfig glXGetVisualFromFBConfigSGIX
   #define glXGetFBConfigAttrib glXGetFBConfigAttribSGIX
-  #define glXCreatePbuffer glXCreateGLXPbufferSGIX
   #define glXDestroyPbuffer glXDestroyGLXPbufferSGIX
 
   #define HAVE_GLXFBCONFIG
+  #define HAVE_SGI_GLXFBCONFIG
 #endif
 
 #endif  // CPPPARSER