respect old versions of glx.h a little better

This commit is contained in:
David Rose 2004-08-05 17:05:31 +00:00
parent 9766fe68c3
commit d165c1c369
2 changed files with 4 additions and 3 deletions

View File

@ -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,

View File

@ -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