diff --git a/ogre/src/CMakeLists.txt b/ogre/src/CMakeLists.txt index bb38fd8b6..2ea299b35 100644 --- a/ogre/src/CMakeLists.txt +++ b/ogre/src/CMakeLists.txt @@ -15,11 +15,8 @@ set(engine_name "ogre") ign_add_component(${engine_name} SOURCES ${sources} GET_TARGET_NAME ogre_target) -if(OGRE_VERSION VERSION_LESS 1.10.3) - add_definitions(-DOGRE_VERSION_LT_1_10_3) -endif() -if(OGRE_VERSION VERSION_LESS 1.10.1) - add_definitions(-DOGRE_VERSION_LT_1_10_1) +if(OGRE_VERSION VERSION_LESS 1.11.0) + add_definitions(-DOGRE_VERSION_LT_1_11_0) endif() if(OGRE_VERSION VERSION_LESS 1.12.0) add_definitions(-DOGRE_VERSION_LT_1_12_0) diff --git a/ogre/src/OgreGaussianNoisePass.cc b/ogre/src/OgreGaussianNoisePass.cc index 84a35e394..082c89f18 100644 --- a/ogre/src/OgreGaussianNoisePass.cc +++ b/ogre/src/OgreGaussianNoisePass.cc @@ -44,7 +44,7 @@ namespace ignition public: virtual void notifyMaterialRender(unsigned int _passId, Ogre::MaterialPtr &_mat) { -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 IGN_ASSERT(!_mat.isNull(), "Null OGRE material"); #else IGN_ASSERT(_mat, "Null OGRE material"); @@ -68,7 +68,7 @@ namespace ignition IGN_ASSERT(pass, "Null OGRE material pass"); Ogre::GpuProgramParametersSharedPtr params = pass->getFragmentProgramParameters(); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 IGN_ASSERT(!params.isNull(), "Null OGRE material GPU parameters"); #else IGN_ASSERT(params, "Null OGRE material GPU parameters"); diff --git a/ogre/src/OgreGpuRays.cc b/ogre/src/OgreGpuRays.cc index 2dba203b6..2c1381557 100644 --- a/ogre/src/OgreGpuRays.cc +++ b/ogre/src/OgreGpuRays.cc @@ -409,7 +409,7 @@ void OgreGpuRays::CreateGpuRaysTextures() Ogre::TextureManager::getSingleton().createManual( texName.str(), "General", Ogre::TEX_TYPE_2D, this->dataPtr->w1st, this->dataPtr->h1st, 0, -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 Ogre::PF_FLOAT32_RGB, Ogre::TU_RENDERTARGET).getPointer(); #else Ogre::PF_FLOAT32_RGB, Ogre::TU_RENDERTARGET).get(); @@ -445,7 +445,7 @@ void OgreGpuRays::CreateGpuRaysTextures() Ogre::TEX_TYPE_2D, this->dataPtr->w2nd, this->dataPtr->h2nd, 0, Ogre::PF_FLOAT32_RGB, -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 Ogre::TU_RENDERTARGET).getPointer(); #else Ogre::TU_RENDERTARGET).get(); diff --git a/ogre/src/OgreMaterial.cc b/ogre/src/OgreMaterial.cc index bcce577bb..29eb8a821 100644 --- a/ogre/src/OgreMaterial.cc +++ b/ogre/src/OgreMaterial.cc @@ -46,7 +46,7 @@ void OgreMaterial::Destroy() return; Ogre::MaterialManager &matManager = Ogre::MaterialManager::getSingleton(); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 if (!this->ogreMaterial.isNull()) { matManager.remove(this->ogreMaterial->getName()); @@ -526,7 +526,7 @@ Ogre::TexturePtr OgreMaterial::CreateTexture(const std::string &_name) if (image.getWidth() == 0) { - #if OGRE_VERSION_LT_1_10_1 + #if OGRE_VERSION_LT_1_11_0 texture.setNull(); #else texture.reset(); diff --git a/ogre/src/OgreMaterialSwitcher.cc b/ogre/src/OgreMaterialSwitcher.cc index dc1b024c3..a75fd1768 100644 --- a/ogre/src/OgreMaterialSwitcher.cc +++ b/ogre/src/OgreMaterialSwitcher.cc @@ -79,7 +79,7 @@ Ogre::Technique *OgreMaterialSwitcher::handleSchemeNotFound( Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); // OGRE 1.9 changes the shared pointer definition - #if OGRE_VERSION_LT_1_10_1 + #if OGRE_VERSION_LT_1_11_0 Ogre::MaterialPtr plainMaterial = res.staticCast(); #else Ogre::MaterialPtr plainMaterial = diff --git a/ogre/src/OgreRTShaderSystem.cc b/ogre/src/OgreRTShaderSystem.cc index 657cef175..4bf49bea1 100644 --- a/ogre/src/OgreRTShaderSystem.cc +++ b/ogre/src/OgreRTShaderSystem.cc @@ -81,7 +81,7 @@ OgreRTShaderSystem::OgreRTShaderSystem() { this->dataPtr->initialized = false; this->dataPtr->shadowsApplied = false; -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 this->dataPtr->pssmSetup.setNull(); #else this->dataPtr->pssmSetup.reset(); @@ -157,7 +157,7 @@ void OgreRTShaderSystem::Fini() #endif this->dataPtr->shaderGenerator = nullptr; } -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 this->dataPtr->pssmSetup.setNull(); #else this->dataPtr->pssmSetup.reset(); @@ -300,7 +300,7 @@ void OgreRTShaderSystem::RemoveShaders(OgreSubMesh *_subMesh) #ifdef OGRE_VERSION_LT_1_12_0 this->dataPtr->shaderGenerator->removeShaderBasedTechnique( curMaterialName, - #ifndef OGRE_VERSION_LT_1_10_3 + #ifndef OGRE_VERSION_LT_1_11_0 curSubEntity->getMaterial()->getGroup(), #endif Ogre::MaterialManager::DEFAULT_SCHEME_NAME, @@ -380,7 +380,7 @@ void OgreRTShaderSystem::GenerateShaders(OgreSubMesh *subMesh) try { success = this->dataPtr->shaderGenerator->createShaderBasedTechnique( -#if OGRE_VERSION_LT_1_10_3 +#if OGRE_VERSION_LT_1_11_0 curMaterialName, #else *material->Material(), @@ -407,7 +407,7 @@ void OgreRTShaderSystem::GenerateShaders(OgreSubMesh *subMesh) this->dataPtr->scenes[s]->Name() + Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME, curMaterialName, -#ifndef OGRE_VERSION_LT_1_10_3 +#ifndef OGRE_VERSION_LT_1_11_0 material->Material()->getGroup(), #endif 0); @@ -590,7 +590,7 @@ void OgreRTShaderSystem::ApplyShadows(OgreScenePtr _scene) sceneMgr->setShadowTextureSelfShadow(false); sceneMgr->setShadowCasterRenderBackFaces(true); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 // Set up caster material - this is just a standard depth/shadow map caster sceneMgr->setShadowTextureCasterMaterial("PSSM/shadow_caster"); #else @@ -607,7 +607,7 @@ void OgreRTShaderSystem::ApplyShadows(OgreScenePtr _scene) // pssmCasterPass->setFog(true); // shadow camera setup -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 if (this->dataPtr->pssmSetup.isNull()) #else if (this->dataPtr->pssmSetup == nullptr) diff --git a/ogre/src/OgreRenderEngine.cc b/ogre/src/OgreRenderEngine.cc index b9e394462..cb72c5650 100644 --- a/ogre/src/OgreRenderEngine.cc +++ b/ogre/src/OgreRenderEngine.cc @@ -212,7 +212,7 @@ void OgreRenderEngine::AddResourcePath(const std::string &_uri) fullPath); bool matPtrNotNull; -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 matPtrNotNull = !matPtr.isNull(); #else matPtrNotNull = matPtr != nullptr; @@ -724,7 +724,7 @@ void OgreRenderEngine::CheckCapabilities() bool hasVertexPrograms = capabilities->hasCapability(Ogre::RSC_VERTEX_PROGRAM); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 bool hasFBO = capabilities->hasCapability(Ogre::RSC_FBO); #else diff --git a/ogre/src/OgreScene.cc b/ogre/src/OgreScene.cc index 19352a0f0..c43d6359b 100644 --- a/ogre/src/OgreScene.cc +++ b/ogre/src/OgreScene.cc @@ -207,7 +207,7 @@ void OgreScene::SetGradientBackgroundColor( // Create background rectangle covering the whole screen rect = new ColoredRectangle2D(); rect->setCorners(-1.0, 1.0, 1.0, -1.0); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 rect->setMaterial("Background"); #else rect->setMaterial(material); diff --git a/ogre/src/OgreText.cc b/ogre/src/OgreText.cc index 7b0d4a238..32538f0fd 100644 --- a/ogre/src/OgreText.cc +++ b/ogre/src/OgreText.cc @@ -350,7 +350,7 @@ void OgreMovableText::SetFontNameImpl(const std::string &_newFontName) } if (this->fontName != _newFontName || -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 this->ogreMaterial.isNull() || !this->font) #else this->ogreMaterial == nullptr || !this->font) @@ -369,7 +369,7 @@ void OgreMovableText::SetFontNameImpl(const std::string &_newFontName) this->font->load(); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 if (!this->ogreMaterial.isNull()) #else if (this->ogreMaterial) @@ -377,7 +377,7 @@ void OgreMovableText::SetFontNameImpl(const std::string &_newFontName) { Ogre::MaterialManager::getSingletonPtr()->remove( this->ogreMaterial->getName()); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 this->ogreMaterial.setNull(); #else this->ogreMaterial = nullptr; @@ -403,7 +403,7 @@ void OgreMovableText::SetFontNameImpl(const std::string &_newFontName) void OgreMovableText::SetupGeometry() { IGN_ASSERT(this->font, "font class member is null"); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 IGN_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); #else IGN_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); @@ -740,7 +740,7 @@ void OgreMovableText::UpdateColors() unsigned int i; IGN_ASSERT(this->font, "font class member is null"); -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 IGN_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); #else IGN_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); @@ -769,7 +769,7 @@ void OgreMovableText::UpdateColors() ////////////////////////////////////////////////// void OgreMovableText::UpdateMaterial() { -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 if (this->ogreMaterial.isNull()) #else if (!this->ogreMaterial) @@ -859,7 +859,7 @@ void OgreMovableText::getRenderOperation(Ogre::RenderOperation &_op) ////////////////////////////////////////////////// const Ogre::MaterialPtr &OgreMovableText::getMaterial(void) const { -#if OGRE_VERSION_LT_1_10_1 +#if OGRE_VERSION_LT_1_11_0 IGN_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); #else IGN_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); diff --git a/ogre/src/OgreThermalCamera.cc b/ogre/src/OgreThermalCamera.cc index cf8b7a7ac..84d6a76f8 100644 --- a/ogre/src/OgreThermalCamera.cc +++ b/ogre/src/OgreThermalCamera.cc @@ -149,7 +149,7 @@ OgreThermalCameraMaterialSwitcher::OgreThermalCameraMaterialSwitcher( Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); // OGRE 1.9 changes the shared pointer definition - #if OGRE_VERSION_LT_1_10_1 + #if OGRE_VERSION_LT_1_11_0 this->heatSourceMaterial = res.staticCast(); #else this->heatSourceMaterial = @@ -422,7 +422,7 @@ void OgreThermalCamera::CreateThermalTexture() Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); // OGRE 1.9 changes the shared pointer definition - #if OGRE_VERSION_LT_1_10_1 + #if OGRE_VERSION_LT_1_11_0 this->dataPtr->thermalMaterial = res.staticCast(); #else this->dataPtr->thermalMaterial =