From 86a09ab03bbdd9d54ebd5730de5392e210d62c13 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 9 Jul 2016 16:20:30 +0200 Subject: [PATCH] LP-32 fix build failure with older osg versions --- ground/gcs/src/libs/osgearth/osgQtQuick/OSGViewport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ground/gcs/src/libs/osgearth/osgQtQuick/OSGViewport.cpp b/ground/gcs/src/libs/osgearth/osgQtQuick/OSGViewport.cpp index e999def40..458ac0c29 100644 --- a/ground/gcs/src/libs/osgearth/osgQtQuick/OSGViewport.cpp +++ b/ground/gcs/src/libs/osgearth/osgQtQuick/OSGViewport.cpp @@ -404,10 +404,12 @@ private: camera->releaseGLObjects(gc->getState()); } } +#if OSG_VERSION_GREATER_OR_EQUAL(3, 5, 0) gc->getState()->releaseGLObjects(); osg::deleteAllGLObjects(gc->getState()->getContextID()); osg::flushAllDeletedGLObjects(gc->getState()->getContextID()); osg::discardAllGLObjects(gc->getState()->getContextID()); +#endif } void createViewer() @@ -502,7 +504,6 @@ private: // if (traits->displayNum < 0) { // traits->displayNum = 0; // } - traits->windowingSystemPreference = "QT"; #if OSG_VERSION_GREATER_OR_EQUAL(3, 5, 3) // The MyQt windowing system is registered in osgearth.cpp