Ogre 1.9 compatibility changes

actorid
scrawl 11 years ago
parent c8e31725dc
commit f12d5b728a

@ -1037,7 +1037,6 @@ public:
VideoPlayer::VideoPlayer(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* window) VideoPlayer::VideoPlayer(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* window)
: mState(NULL) : mState(NULL)
, mSceneMgr(sceneMgr) , mSceneMgr(sceneMgr)
, mVideoMaterial(NULL)
, mRectangle(NULL) , mRectangle(NULL)
, mNode(NULL) , mNode(NULL)
, mAllowSkipping(false) , mAllowSkipping(false)

@ -4,10 +4,7 @@
#include <SDL_types.h> #include <SDL_types.h>
#include <string> #include <string>
namespace Ogre #include <OgreTexture.h>
{
class TexturePtr;
}
namespace SFO namespace SFO
{ {

@ -104,6 +104,20 @@ BulletShapeManager::~BulletShapeManager()
sThis = 0; sThis = 0;
} }
#if (OGRE_VERSION >= ((1 << 16) | (9 << 8) | 0))
BulletShapePtr BulletShapeManager::getByName(const Ogre::String& name, const Ogre::String& groupName)
{
return getResourceByName(name, groupName).staticCast<BulletShape>();
}
BulletShapePtr BulletShapeManager::create (const Ogre::String& name, const Ogre::String& group,
bool isManual, Ogre::ManualResourceLoader* loader,
const Ogre::NameValuePairList* createParams)
{
return createResource(name,group,isManual,loader,createParams).staticCast<BulletShape>();
}
#endif
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group) BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
{ {
BulletShapePtr textf = getByName(name); BulletShapePtr textf = getByName(name);

@ -48,6 +48,8 @@ public:
/** /**
* *
*/ */
#if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
class BulletShapePtr : public Ogre::SharedPtr<BulletShape> class BulletShapePtr : public Ogre::SharedPtr<BulletShape>
{ {
public: public:
@ -91,9 +93,9 @@ public:
return *this; return *this;
} }
}; };
#else
typedef Ogre::SharedPtr<BulletShape> BulletShapePtr;
#endif
/** /**
*Hold any BulletShape that was created by the ManualBulletShapeLoader. *Hold any BulletShape that was created by the ManualBulletShapeLoader.
@ -137,6 +139,19 @@ public:
BulletShapeManager(); BulletShapeManager();
virtual ~BulletShapeManager(); virtual ~BulletShapeManager();
#if (OGRE_VERSION >= ((1 << 16) | (9 << 8) | 0))
/// Get a resource by name
/// @see ResourceManager::getByName
BulletShapePtr getByName(const Ogre::String& name, const Ogre::String& groupName = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
/// Create a new shape
/// @see ResourceManager::createResource
BulletShapePtr create (const Ogre::String& name, const Ogre::String& group,
bool isManual = false, Ogre::ManualResourceLoader* loader = 0,
const Ogre::NameValuePairList* createParams = 0);
#endif
virtual BulletShapePtr load(const Ogre::String &name, const Ogre::String &group); virtual BulletShapePtr load(const Ogre::String &name, const Ogre::String &group);
static BulletShapeManager &getSingleton(); static BulletShapeManager &getSingleton();

Loading…
Cancel
Save