respect old versions of glx.h a little better
This commit is contained in:
parent
9766fe68c3
commit
d165c1c369
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue