1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-06 21:54:15 +01:00

LP-32 fix build failure with older osg versions

This commit is contained in:
Philippe Renon 2016-07-09 16:20:30 +02:00
parent 79764f7392
commit 86a09ab03b

View File

@ -404,10 +404,12 @@ private:
camera->releaseGLObjects(gc->getState()); camera->releaseGLObjects(gc->getState());
} }
} }
#if OSG_VERSION_GREATER_OR_EQUAL(3, 5, 0)
gc->getState()->releaseGLObjects(); gc->getState()->releaseGLObjects();
osg::deleteAllGLObjects(gc->getState()->getContextID()); osg::deleteAllGLObjects(gc->getState()->getContextID());
osg::flushAllDeletedGLObjects(gc->getState()->getContextID()); osg::flushAllDeletedGLObjects(gc->getState()->getContextID());
osg::discardAllGLObjects(gc->getState()->getContextID()); osg::discardAllGLObjects(gc->getState()->getContextID());
#endif
} }
void createViewer() void createViewer()
@ -502,7 +504,6 @@ private:
// if (traits->displayNum < 0) { // if (traits->displayNum < 0) {
// traits->displayNum = 0; // traits->displayNum = 0;
// } // }
traits->windowingSystemPreference = "QT";
#if OSG_VERSION_GREATER_OR_EQUAL(3, 5, 3) #if OSG_VERSION_GREATER_OR_EQUAL(3, 5, 3)
// The MyQt windowing system is registered in osgearth.cpp // The MyQt windowing system is registered in osgearth.cpp