Added #idef guards for SGIX usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15070 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
559da06ffa
commit
8b4ff0f50a
@ -85,6 +85,7 @@ class OSGVIEWER_EXPORT PixelBufferX11 : public osg::GraphicsContext, public osgV
|
||||
bool _useGLX1_3;
|
||||
bool _useSGIX;
|
||||
|
||||
#ifdef GLX_SGIX_pbuffer
|
||||
typedef Pbuffer ( *GLXCreateGLXPbufferSGIX_FuncPtr) (Display *dpy, GLXFBConfig config, unsigned int, unsigned height, int* attrib_list);
|
||||
typedef void ( *GLXDestroyGLXPbufferSGIX_FuncPtr) (Display *dpy, Pbuffer pbuf);
|
||||
typedef int ( *GLXQueryGLXPbufferSGIX_FuncCPtr) (Display *dpy, Pbuffer pbuf, int attribute, unsigned int *value);
|
||||
@ -94,6 +95,7 @@ class OSGVIEWER_EXPORT PixelBufferX11 : public osg::GraphicsContext, public osgV
|
||||
GLXDestroyGLXPbufferSGIX_FuncPtr _glXDestroyGLXPbufferSGIX;
|
||||
GLXQueryGLXPbufferSGIX_FuncCPtr _glXQueryGLXPbufferSGIX;
|
||||
GLXGetFBConfigFromVisualSGIX_FuncPtr _glXGetFBConfigFromVisualSGIX;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -33,11 +33,13 @@ PixelBufferX11::PixelBufferX11(osg::GraphicsContext::Traits* traits)
|
||||
_initialized(false),
|
||||
_realized(false),
|
||||
_useGLX1_3(false),
|
||||
_useSGIX(false),
|
||||
_glXCreateGLXPbufferSGIX(NULL),
|
||||
_useSGIX(false)
|
||||
#ifdef GLX_SGIX_pbuffer
|
||||
,_glXCreateGLXPbufferSGIX(NULL),
|
||||
_glXDestroyGLXPbufferSGIX(NULL),
|
||||
_glXQueryGLXPbufferSGIX(NULL),
|
||||
_glXGetFBConfigFromVisualSGIX(NULL)
|
||||
#endif
|
||||
{
|
||||
_traits = traits;
|
||||
|
||||
@ -179,7 +181,7 @@ void PixelBufferX11::init()
|
||||
haveGLX1_3 = true;
|
||||
}
|
||||
|
||||
#if defined(GLX_VERSION_1_1)
|
||||
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_pbuffer)
|
||||
// We need at least GLX 1.1 for glXQueryExtensionsString
|
||||
if (!haveGLX1_3 && 1 <= minor)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user