1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00

Changes to compile with osg-svn 3.3.8

This commit is contained in:
scrawl 2015-06-07 23:51:54 +02:00
parent 0330d3d61e
commit 9c9b83f8e2
3 changed files with 22 additions and 0 deletions

View file

@ -4,6 +4,8 @@
#include <osg/Drawable>
#include <osg/Geode>
#include <osg/NodeCallback>
#include <osg/Version>
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<Controller*>(callback))
@ -89,7 +95,13 @@ namespace SceneUtil
for (unsigned int i=0; i<geode.getNumDrawables(); ++i)
{
osg::Drawable* drw = geode.getDrawable(i);
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
osg::Callback* callback = drw->getUpdateCallback();
#else
osg::Drawable::UpdateCallback* callback = drw->getUpdateCallback();
#endif
if (Controller* ctrl = dynamic_cast<Controller*>(callback))
visit(geode, *ctrl);
}

View file

@ -1,6 +1,7 @@
#include "statesetupdater.hpp"
#include <osg/Node>
#include <osg/NodeVisitor>
namespace SceneUtil
{

View file

@ -3,6 +3,7 @@
#include <SDL_video.h>
#include <osg/DeleteHandler>
#include <osg/Version>
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;