From Mathias Froehlich, "I have extended the X11 pbuffer code to use either the complete set of glx 1.3
pbuffer functions or exactly ask for the extensions we need to call the apropriate glx extension functions for and around pbuffers extensions. The glx 1.3 version of this functios are prefered. If this is not pressent we are looking for the glx extensions and check for them. Prevously we just used some mix of the glx 1.3 functions or the extension functions without making sure that this extension is present. "
This commit is contained in:
@@ -28,6 +28,10 @@ namespace osg {
|
||||
*/
|
||||
extern OSG_EXPORT float getGLVersionNumber();
|
||||
|
||||
/** Return true if "extension" is contained in "extensionString".
|
||||
*/
|
||||
extern OSG_EXPORT bool isExtensionInExtensionString(const char *extension, const char *extensionString);
|
||||
|
||||
/** Return true if OpenGL "extension" is supported.
|
||||
* Note: Must only be called within a valid OpenGL context,
|
||||
* undefined behavior may occur otherwise.
|
||||
|
||||
@@ -77,7 +77,6 @@ class OSGVIEWER_EXPORT PixelBufferX11 : public osg::GraphicsContext
|
||||
|
||||
Display* getDisplay() const { return _display; }
|
||||
|
||||
Window& getParent() { return _parent; }
|
||||
GLXPbuffer& getPbuffer() { return _pbuffer; }
|
||||
GLXContext& getGLXContext() { return _glxContext; }
|
||||
|
||||
@@ -91,13 +90,14 @@ class OSGVIEWER_EXPORT PixelBufferX11 : public osg::GraphicsContext
|
||||
|
||||
bool _valid;
|
||||
Display* _display;
|
||||
Window _parent;
|
||||
GLXPbuffer _pbuffer;
|
||||
XVisualInfo* _visualInfo;
|
||||
GLXContext _glxContext;
|
||||
|
||||
bool _initialized;
|
||||
bool _realized;
|
||||
|
||||
bool _useGLX1_3;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user