diff --git a/components/sceneutil/controller.cpp b/components/sceneutil/controller.cpp index b8b452dc3..a2c1cdcd3 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 66e40f3e1..36aa683db 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 f16c0bca4..84aafa100 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;