blob: fffada994d51335e59d39050a1b7a349dd4f2e0a [file] [log] [blame] [edit]
# HG changeset patch
# User Erik Ogenvik <erik@ogenvik.org>
# Date 1521148101 -3600
# Branch v0-8
# Node ID b1664b20dedddad5a28f2c8f765a8b8a87392c7d
# Parent dce97df906cf930dcb8a78e5fdd799e0433a2e95
Support Ogre 1.11.
Which amongst things now require C++11.
diff --git a/cegui/src/RendererModules/Ogre/CMakeLists.txt b/cegui/src/RendererModules/Ogre/CMakeLists.txt
--- a/cegui/src/RendererModules/Ogre/CMakeLists.txt
+++ b/cegui/src/RendererModules/Ogre/CMakeLists.txt
@@ -9,3 +9,13 @@
cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})
+if (CEGUI_FOUND_OGRE_VERSION_MAJOR GREATER 0 AND CEGUI_FOUND_OGRE_VERSION_MINOR GREATER 10)
+target_compile_features(${CEGUI_TARGET_NAME} PRIVATE cxx_std_11)
+
+target_compile_definitions(${CEGUI_TARGET_NAME}
+ PRIVATE
+ -DOGRE_VERSION_MAJOR=${CEGUI_FOUND_OGRE_VERSION_MAJOR}
+ -DOGRE_VERSION_MINOR=${CEGUI_FOUND_OGRE_VERSION_MINOR}
+ )
+endif(CEGUI_FOUND_OGRE_VERSION_MAJOR GREATER 0 AND CEGUI_FOUND_OGRE_VERSION_MINOR GREATER 10)
+
diff --git a/cegui/src/RendererModules/Ogre/Renderer.cpp b/cegui/src/RendererModules/Ogre/Renderer.cpp
--- a/cegui/src/RendererModules/Ogre/Renderer.cpp
+++ b/cegui/src/RendererModules/Ogre/Renderer.cpp
@@ -62,6 +62,12 @@
#include <OgreHlmsDatablock.h>
#endif
+#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 11
+#ifdef OGRE_BUILD_COMPONENT_RTSHADERSYSTEM
+#include <RTShaderSystem/OgreRTShaderConfig.h>
+#endif
+#endif
+
// Start of CEGUI namespace section
namespace CEGUI
{
@@ -785,7 +791,7 @@
// Check if built with RT Shader System and if it is: Check if fixed function pipeline is enabled
#else
#if defined RTSHADER_SYSTEM_BUILD_CORE_SHADERS
- bool isFixedFunctionEnabled = d_pimpl->d_renderSystem->getFixedPipelineEnabled();
+ bool isFixedFunctionEnabled = d_pimpl->d_renderSystem->getCapabilities()->hasCapability(Ogre::RSC_FIXED_FUNCTION);
#else
bool isFixedFunctionEnabled = true;
#endif
diff --git a/cegui/src/RendererModules/Ogre/Texture.cpp b/cegui/src/RendererModules/Ogre/Texture.cpp
--- a/cegui/src/RendererModules/Ogre/Texture.cpp
+++ b/cegui/src/RendererModules/Ogre/Texture.cpp
@@ -243,7 +243,7 @@
// address the issue as close to the source of the problem as possible.
Ogre::PixelBox pb(area.getWidth(), area.getHeight(),
1, d_texture->getFormat(), const_cast<void*>(sourceData));
- Ogre::Image::Box box(area.left(), area.top(), area.right(), area.bottom());
+ Ogre::Box box(area.left(), area.top(), area.right(), area.bottom());
d_texture->getBuffer()->blitFromMemory(pb, box);
}
@@ -400,7 +400,7 @@
}
//----------------------------------------------------------------------------//
-void OgreTexture::createEmptyOgreTexture(Ogre::PixelFormat pixel_format)
+void OgreTexture::createEmptyOgreTexture(PixelFormat pixel_format)
{
// try to create a Ogre::Texture with given dimensions
d_texture = Ogre::TextureManager::getSingleton().createManual(