diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index f538d2d89..99affbec2 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -55,6 +55,7 @@ #include #include +#include #include #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. diff --git a/src/Viewer/GraphicsWindowQt5.cpp b/src/Viewer/GraphicsWindowQt5.cpp index 4e87dd876..a1520bd5f 100644 --- a/src/Viewer/GraphicsWindowQt5.cpp +++ b/src/Viewer/GraphicsWindowQt5.cpp @@ -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