From 9c9b83f8e20d8b2bbdaa2ed004d21ad4b6438501 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 7 Jun 2015 23:51:54 +0200 Subject: [PATCH] Changes to compile with osg-svn 3.3.8 --- components/sceneutil/controller.cpp | 12 ++++++++++++ components/sceneutil/statesetupdater.cpp | 1 + components/sdlutil/sdlgraphicswindow.cpp | 9 +++++++++ 3 files changed, 22 insertions(+) diff --git a/components/sceneutil/controller.cpp b/components/sceneutil/controller.cpp index b8b452dc3a..a2c1cdcd39 100644 --- a/components/sceneutil/controller.cpp +++ b/components/sceneutil/controller.cpp @@ -4,6 +4,8 @@ #include #include +#include +#include namespace SceneUtil { @@ -63,7 +65,11 @@ namespace SceneUtil void ControllerVisitor::apply(osg::Node &node) { +#if OSG_MIN_VERSION_REQUIRED(3,3,3) + osg::Callback* callback = node.getUpdateCallback(); +#else osg::NodeCallback* callback = node.getUpdateCallback(); +#endif while (callback) { if (Controller* ctrl = dynamic_cast(callback)) @@ -89,7 +95,13 @@ namespace SceneUtil for (unsigned int i=0; igetUpdateCallback(); +#else osg::Drawable::UpdateCallback* callback = drw->getUpdateCallback(); +#endif + if (Controller* ctrl = dynamic_cast(callback)) visit(geode, *ctrl); } diff --git a/components/sceneutil/statesetupdater.cpp b/components/sceneutil/statesetupdater.cpp index 66e40f3e10..36aa683dbe 100644 --- a/components/sceneutil/statesetupdater.cpp +++ b/components/sceneutil/statesetupdater.cpp @@ -1,6 +1,7 @@ #include "statesetupdater.hpp" #include +#include namespace SceneUtil { diff --git a/components/sdlutil/sdlgraphicswindow.cpp b/components/sdlutil/sdlgraphicswindow.cpp index f16c0bca4d..84aafa1004 100644 --- a/components/sdlutil/sdlgraphicswindow.cpp +++ b/components/sdlutil/sdlgraphicswindow.cpp @@ -3,6 +3,7 @@ #include #include +#include namespace SDLUtil { @@ -108,7 +109,11 @@ void GraphicsWindowSDL2::init() mValid = true; +#if OSG_MIN_VERSION_REQUIRED(3,3,4) + getEventQueue()->syncWindowRectangleWithGraphicsContext(); +#else getEventQueue()->syncWindowRectangleWithGraphcisContext(); +#endif } @@ -125,7 +130,11 @@ bool GraphicsWindowSDL2::realizeImplementation() SDL_ShowWindow(mWindow); +#if OSG_MIN_VERSION_REQUIRED(3,3,4) + getEventQueue()->syncWindowRectangleWithGraphicsContext(); +#else getEventQueue()->syncWindowRectangleWithGraphcisContext(); +#endif mRealized = true;