forked from mirror/openmw-tes3mp
Remove support for Ogre 1.8 versions
This commit is contained in:
parent
ef43196ef2
commit
b1e74e2a85
6 changed files with 3 additions and 78 deletions
|
@ -221,6 +221,9 @@ IF(BOOST_STATIC)
|
|||
endif()
|
||||
|
||||
find_package(OGRE REQUIRED)
|
||||
if (${OGRE_VERSION} VERSION_LESS "1.9")
|
||||
message(FATAL_ERROR "OpenMW requires Ogre 1.9 or later, please install the latest stable version from http://ogre3d.org")
|
||||
endif()
|
||||
|
||||
find_package(MyGUI REQUIRED)
|
||||
if (${MYGUI_VERSION} VERSION_LESS "3.2.1")
|
||||
|
|
|
@ -66,11 +66,8 @@ namespace MWGui
|
|||
|
||||
// Temporarily turn off VSync, we want to do actual loading rather than waiting for the screen to sync.
|
||||
// Threaded loading would be even better, of course - especially because some drivers force VSync to on and we can't change it.
|
||||
// In Ogre 1.8, the swapBuffers argument is useless and setVSyncEnabled is bugged with GLX, nothing we can do :/
|
||||
mVSyncWasEnabled = mWindow->isVSyncEnabled();
|
||||
#if OGRE_VERSION >= (1 << 16 | 9 << 8 | 0)
|
||||
mWindow->setVSyncEnabled(false);
|
||||
#endif
|
||||
|
||||
bool showWallpaper = (MWBase::Environment::get().getStateManager()->getState()
|
||||
== MWBase::StateManager::State_NoGame);
|
||||
|
@ -113,10 +110,7 @@ namespace MWGui
|
|||
void LoadingScreen::loadingOff()
|
||||
{
|
||||
// Re-enable vsync now.
|
||||
// In Ogre 1.8, the swapBuffers argument is useless and setVSyncEnabled is bugged with GLX, nothing we can do :/
|
||||
#if OGRE_VERSION >= (1 << 16 | 9 << 8 | 0)
|
||||
mWindow->setVSyncEnabled(mVSyncWasEnabled);
|
||||
#endif
|
||||
|
||||
setVisible(false);
|
||||
|
||||
|
|
|
@ -294,15 +294,6 @@ namespace MWGui
|
|||
newState = true;
|
||||
}
|
||||
|
||||
if (_sender == mVSyncButton)
|
||||
{
|
||||
// Ogre::Window::setVSyncEnabled is bugged in 1.8
|
||||
#if OGRE_VERSION < (1 << 16 | 9 << 8 | 0)
|
||||
MWBase::Environment::get().getWindowManager()->
|
||||
messageBox("VSync will be applied after a restart", std::vector<std::string>());
|
||||
#endif
|
||||
}
|
||||
|
||||
if (_sender == mShadersButton)
|
||||
{
|
||||
if (newState == false)
|
||||
|
|
|
@ -113,13 +113,7 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
|
|||
|
||||
mFactory->loadAllFiles();
|
||||
|
||||
// Compressed textures with 0 mip maps are bugged in 1.8, so disable mipmap generator in that case
|
||||
// ( https://ogre3d.atlassian.net/browse/OGRE-259 )
|
||||
#if OGRE_VERSION >= (1 << 16 | 9 << 8 | 0)
|
||||
TextureManager::getSingleton().setDefaultNumMipmaps(Settings::Manager::getInt("num mipmaps", "General"));
|
||||
#else
|
||||
TextureManager::getSingleton().setDefaultNumMipmaps(0);
|
||||
#endif
|
||||
|
||||
// Set default texture filtering options
|
||||
TextureFilterOptions tfo;
|
||||
|
@ -772,13 +766,6 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
|
|||
|| it->second == "resolution y"
|
||||
|| it->second == "fullscreen"))
|
||||
changeRes = true;
|
||||
else if (it->first == "Video" && it->second == "vsync")
|
||||
{
|
||||
// setVSyncEnabled is bugged in 1.8
|
||||
#if OGRE_VERSION >= (1 << 16 | 9 << 8 | 0)
|
||||
mRendering.getWindow()->setVSyncEnabled(Settings::Manager::getBool("vsync", "Video"));
|
||||
#endif
|
||||
}
|
||||
else if (it->second == "field of view" && it->first == "General")
|
||||
mRendering.setFov(Settings::Manager::getFloat("field of view", "General"));
|
||||
else if ((it->second == "texture filtering" && it->first == "General")
|
||||
|
|
|
@ -105,7 +105,6 @@ BulletShapeManager::~BulletShapeManager()
|
|||
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>();
|
||||
|
@ -117,7 +116,6 @@ BulletShapePtr BulletShapeManager::create (const Ogre::String& name, const Ogre:
|
|||
{
|
||||
return createResource(name,group,isManual,loader,createParams).staticCast<BulletShape>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
|
||||
{
|
||||
|
|
|
@ -55,53 +55,7 @@ public:
|
|||
*
|
||||
*/
|
||||
|
||||
#if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
|
||||
class BulletShapePtr : public Ogre::SharedPtr<BulletShape>
|
||||
{
|
||||
public:
|
||||
BulletShapePtr() : Ogre::SharedPtr<BulletShape>() {}
|
||||
explicit BulletShapePtr(BulletShape *rep) : Ogre::SharedPtr<BulletShape>(rep) {}
|
||||
BulletShapePtr(const BulletShapePtr &r) : Ogre::SharedPtr<BulletShape>(r) {}
|
||||
BulletShapePtr(const Ogre::ResourcePtr &r) : Ogre::SharedPtr<BulletShape>()
|
||||
{
|
||||
if( r.isNull() )
|
||||
return;
|
||||
// lock & copy other mutex pointer
|
||||
OGRE_LOCK_MUTEX(*r.OGRE_AUTO_MUTEX_NAME)
|
||||
OGRE_COPY_AUTO_SHARED_MUTEX(r.OGRE_AUTO_MUTEX_NAME)
|
||||
pRep = static_cast<BulletShape*>(r.getPointer());
|
||||
pUseCount = r.useCountPointer();
|
||||
useFreeMethod = r.freeMethod();
|
||||
if (pUseCount)
|
||||
{
|
||||
++(*pUseCount);
|
||||
}
|
||||
}
|
||||
|
||||
/// Operator used to convert a ResourcePtr to a BulletShapePtr
|
||||
BulletShapePtr& operator=(const Ogre::ResourcePtr& r)
|
||||
{
|
||||
if(pRep == static_cast<BulletShape*>(r.getPointer()))
|
||||
return *this;
|
||||
release();
|
||||
if( r.isNull() )
|
||||
return *this; // resource ptr is null, so the call to release above has done all we need to do.
|
||||
// lock & copy other mutex pointer
|
||||
OGRE_LOCK_MUTEX(*r.OGRE_AUTO_MUTEX_NAME)
|
||||
OGRE_COPY_AUTO_SHARED_MUTEX(r.OGRE_AUTO_MUTEX_NAME)
|
||||
pRep = static_cast<BulletShape*>(r.getPointer());
|
||||
pUseCount = r.useCountPointer();
|
||||
useFreeMethod = r.freeMethod();
|
||||
if (pUseCount)
|
||||
{
|
||||
++(*pUseCount);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
#else
|
||||
typedef Ogre::SharedPtr<BulletShape> BulletShapePtr;
|
||||
#endif
|
||||
|
||||
/**
|
||||
*Hold any BulletShape that was created by the ManualBulletShapeLoader.
|
||||
|
@ -146,7 +100,6 @@ public:
|
|||
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);
|
||||
|
@ -156,7 +109,6 @@ public:
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue