1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Fix osg 3.2 compat

This commit is contained in:
James Duley 2016-01-16 00:07:58 +00:00
parent 72560638c8
commit f89031dc6c

View File

@ -30,6 +30,7 @@
#include "utility.h" #include "utility.h"
#include <osg/DeleteHandler> #include <osg/DeleteHandler>
#include <osg/Version>
#include <osgViewer/GraphicsWindow> #include <osgViewer/GraphicsWindow>
#include <QOpenGLContext> #include <QOpenGLContext>
@ -139,7 +140,11 @@ void GraphicsWindowQt::init()
} }
// make sure the event queue has the correct window rectangle size and input range // make sure the event queue has the correct window rectangle size and input range
#if OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0)
getEventQueue()->syncWindowRectangleWithGraphicsContext(); getEventQueue()->syncWindowRectangleWithGraphicsContext();
#else
getEventQueue()->syncWindowRectangleWithGraphcisContext();
#endif
_initialized = true; _initialized = true;
@ -246,7 +251,11 @@ bool GraphicsWindowQt::realizeImplementation()
_realized = true; _realized = true;
// make sure the event queue has the correct window rectangle size and input range // make sure the event queue has the correct window rectangle size and input range
#if OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0)
getEventQueue()->syncWindowRectangleWithGraphicsContext(); getEventQueue()->syncWindowRectangleWithGraphicsContext();
#else
getEventQueue()->syncWindowRectangleWithGraphcisContext();
#endif
// make this window's context not current // make this window's context not current
// note: this must be done as we will probably make the context current from another thread // note: this must be done as we will probably make the context current from another thread