Added #ifdef guards around SGIX specific parts to avoid build problems with GLES
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15069 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
fde838b029
commit
583801179e
@ -85,6 +85,7 @@ class OSGVIEWER_EXPORT PixelBufferX11 : public osg::GraphicsContext, public osgV
|
|||||||
bool _useGLX1_3;
|
bool _useGLX1_3;
|
||||||
bool _useSGIX;
|
bool _useSGIX;
|
||||||
|
|
||||||
|
#ifdef GLX_SGIX_pbuffer
|
||||||
typedef Pbuffer ( *GLXCreateGLXPbufferSGIX_FuncPtr) (Display *dpy, GLXFBConfig config, unsigned int, unsigned height, int* attrib_list);
|
typedef Pbuffer ( *GLXCreateGLXPbufferSGIX_FuncPtr) (Display *dpy, GLXFBConfig config, unsigned int, unsigned height, int* attrib_list);
|
||||||
typedef void ( *GLXDestroyGLXPbufferSGIX_FuncPtr) (Display *dpy, Pbuffer pbuf);
|
typedef void ( *GLXDestroyGLXPbufferSGIX_FuncPtr) (Display *dpy, Pbuffer pbuf);
|
||||||
typedef int ( *GLXQueryGLXPbufferSGIX_FuncCPtr) (Display *dpy, Pbuffer pbuf, int attribute, unsigned int *value);
|
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;
|
GLXDestroyGLXPbufferSGIX_FuncPtr _glXDestroyGLXPbufferSGIX;
|
||||||
GLXQueryGLXPbufferSGIX_FuncCPtr _glXQueryGLXPbufferSGIX;
|
GLXQueryGLXPbufferSGIX_FuncCPtr _glXQueryGLXPbufferSGIX;
|
||||||
GLXGetFBConfigFromVisualSGIX_FuncPtr _glXGetFBConfigFromVisualSGIX;
|
GLXGetFBConfigFromVisualSGIX_FuncPtr _glXGetFBConfigFromVisualSGIX;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,12 +33,14 @@ PixelBufferX11::PixelBufferX11(osg::GraphicsContext::Traits* traits)
|
|||||||
_initialized(false),
|
_initialized(false),
|
||||||
_realized(false),
|
_realized(false),
|
||||||
_useGLX1_3(false),
|
_useGLX1_3(false),
|
||||||
_useSGIX(false),
|
_useSGIX(false)
|
||||||
_glXCreateGLXPbufferSGIX(NULL),
|
#ifdef GLX_SGIX_pbuffer
|
||||||
|
,_glXCreateGLXPbufferSGIX(NULL),
|
||||||
_glXDestroyGLXPbufferSGIX(NULL),
|
_glXDestroyGLXPbufferSGIX(NULL),
|
||||||
_glXQueryGLXPbufferSGIX(NULL),
|
_glXQueryGLXPbufferSGIX(NULL),
|
||||||
_glXGetFBConfigFromVisualSGIX(NULL)
|
_glXGetFBConfigFromVisualSGIX(NULL)
|
||||||
{
|
#endif
|
||||||
|
{
|
||||||
_traits = traits;
|
_traits = traits;
|
||||||
|
|
||||||
init();
|
init();
|
||||||
@ -179,7 +181,7 @@ void PixelBufferX11::init()
|
|||||||
haveGLX1_3 = true;
|
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
|
// We need at least GLX 1.1 for glXQueryExtensionsString
|
||||||
if (!haveGLX1_3 && 1 <= minor)
|
if (!haveGLX1_3 && 1 <= minor)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user