Improved OSG Version detection.
This commit is contained in:
parent
4f5f0f63fd
commit
1ede51f3f6
2 changed files with 4 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue