From d165c1c369aa1b00393792e1b207ab8e6bc88cfb Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Aug 2004 17:05:31 +0000 Subject: [PATCH] respect old versions of glx.h a little better --- panda/src/glxdisplay/glxGraphicsBuffer.cxx | 4 ++-- panda/src/glxdisplay/glxGraphicsPipe.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/panda/src/glxdisplay/glxGraphicsBuffer.cxx b/panda/src/glxdisplay/glxGraphicsBuffer.cxx index d28dcc8056..d3f3a01db1 100644 --- a/panda/src/glxdisplay/glxGraphicsBuffer.cxx +++ b/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, diff --git a/panda/src/glxdisplay/glxGraphicsPipe.h b/panda/src/glxdisplay/glxGraphicsPipe.h index 1b749d8dd8..acf805a328 100644 --- a/panda/src/glxdisplay/glxGraphicsPipe.h +++ b/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