1
0
Fork 0

Improved OSG Version detection.

This commit is contained in:
Scott Giese 2019-08-26 17:45:16 -05:00
parent 4f5f0f63fd
commit 1ede51f3f6
2 changed files with 4 additions and 3 deletions

View file

@ -55,6 +55,7 @@
#include <osg/Texture>
#include <osg/BufferObject>
#include <osg/Version>
#include <Viewer/fgviewer.hxx>
#include "main.hxx"
@ -337,7 +338,7 @@ int main ( int argc, char **argv )
sglog();
#if (OPENSCENEGRAPH_MAJOR_VERSION == 3) && (OPENSCENEGRAPH_MINOR_VERSION < 5)
#if OSG_VERSION_LESS_THAN(3, 5, 0)
// similar to above, ensure some static maps inside OSG exist before
// we register our at-exit handler, otherwise the statics are gone
// when fg_terminate runs, which causes crashes.

View file

@ -429,7 +429,7 @@ bool GraphicsWindowQt5::init( Qt::WindowFlags f )
getState()->setGraphicsContext(this);
getState()->setContextID( osg::GraphicsContext::createNewContextID() );
#if (OPENSCENEGRAPH_MAJOR_VERSION == 3) && (OPENSCENEGRAPH_MINOR_VERSION >= 4)
#if OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0)
// make sure the event queue has the correct window rectangle size and input range
getEventQueue()->syncWindowRectangleWithGraphicsContext();
#endif
@ -640,7 +640,7 @@ bool GraphicsWindowQt5::realizeImplementation()
_window->show();
}
#if (OPENSCENEGRAPH_MAJOR_VERSION == 3) && (OPENSCENEGRAPH_MINOR_VERSION >= 4)
#if OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0)
// make sure the event queue has the correct window rectangle size and input range
getEventQueue()->syncWindowRectangleWithGraphicsContext();
#endif