Added preliminary handling of cases where GLX version < 1.3
This commit is contained in:
@@ -27,6 +27,11 @@
|
||||
#include <X11/X.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
typedef XID GLXPbuffer;
|
||||
#endif
|
||||
|
||||
|
||||
namespace osgViewer
|
||||
{
|
||||
|
||||
@@ -34,37 +39,7 @@ class OSGVIEWER_EXPORT PixelBufferX11 : public osg::GraphicsContext
|
||||
{
|
||||
public:
|
||||
|
||||
PixelBufferX11(osg::GraphicsContext::Traits* traits):
|
||||
_valid(false),
|
||||
_display(0),
|
||||
_parent(0),
|
||||
_pbuffer(0),
|
||||
_visualInfo(0),
|
||||
_glxContext(0),
|
||||
_initialized(false),
|
||||
_realized(false)
|
||||
{
|
||||
_traits = traits;
|
||||
|
||||
init();
|
||||
|
||||
if (valid())
|
||||
{
|
||||
setState( new osg::State );
|
||||
getState()->setGraphicsContext(this);
|
||||
|
||||
if (_traits.valid() && _traits->sharedContext)
|
||||
{
|
||||
getState()->setContextID( _traits->sharedContext->getState()->getContextID() );
|
||||
incrementContextIDUsageCount( getState()->getContextID() );
|
||||
}
|
||||
else
|
||||
{
|
||||
getState()->setContextID( osg::GraphicsContext::createNewContextID() );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
PixelBufferX11(osg::GraphicsContext::Traits* traits);
|
||||
|
||||
virtual bool isSameKindAs(const Object* object) const { return dynamic_cast<const PixelBufferX11*>(object)!=0; }
|
||||
virtual const char* libraryName() const { return "osgViewer"; }
|
||||
|
||||
Reference in New Issue
Block a user