blob: af6d191da9573bccd08dbc541a83d7bc20595f9b [file] [log] [blame]
# HG changeset patch
# User Yaron Cohen-Tal <yaronct@gmail.com>
# Date 1468180751 -10800
# Branch v0-8
# Node ID cce0889ac7b4841a0518a6d5185be9a7ea11b433
# Parent 1bf57eb8472954a61aff848900bcb513c1b6cf92
Fix problems I've created in the sample framework with the Ogre renderer.
diff --git a/cmake/FindOgre.cmake b/cmake/FindOgre.cmake
--- a/cmake/FindOgre.cmake
+++ b/cmake/FindOgre.cmake
@@ -142,11 +142,11 @@
# Find the release and debug libraries.
find_library(OGRE_LIB NAMES ${OGRE_LIBRARY_NAMES}
PATHS ${OGRE_PREFIX_PATH}
- PATH_SUFFIXES Release lib/Release)
+ PATH_SUFFIXES Release lib/Release release lib/release)
find_library(OGRE_LIB_DBG NAMES ${OGRE_LIBRARY_NAMES}_d
PATHS ${OGRE_PREFIX_PATH}
- PATH_SUFFIXES Debug lib/Debug)
+ PATH_SUFFIXES Debug lib/Debug debug lib/debug)
if (NOT OGRE_LIB AND OGRE_LIB_DBG)
set(OGRE_LIB OGRE_LIB_DBG)
diff --git a/samples_framework/include/CEGuiBaseApplication.h b/samples_framework/include/CEGuiBaseApplication.h
--- a/samples_framework/include/CEGuiBaseApplication.h
+++ b/samples_framework/include/CEGuiBaseApplication.h
@@ -163,8 +163,7 @@
the CEGUI::DefaultResourceProvider - override if the sample base app
being implemented uses something else!
*/
- virtual void initialiseResourceGroupDirectories
- (const CEGUI::String& dataPathPrefixOverride);
+ virtual void initialiseResourceGroupDirectories();
//! initialise the standard default resource groups used by the samples.
virtual void initialiseDefaultResourceGroups();
diff --git a/samples_framework/include/CEGuiOgreBaseApplication.h b/samples_framework/include/CEGuiOgreBaseApplication.h
--- a/samples_framework/include/CEGuiOgreBaseApplication.h
+++ b/samples_framework/include/CEGuiOgreBaseApplication.h
@@ -84,6 +84,7 @@
bool frameRenderingQueued(const Ogre::FrameEvent& evt);
bool isInitialised();
+ void run();
protected:
// override from base class since we use a non-default resource provider.
diff --git a/samples_framework/src/CEGuiBaseApplication.cpp b/samples_framework/src/CEGuiBaseApplication.cpp
--- a/samples_framework/src/CEGuiBaseApplication.cpp
+++ b/samples_framework/src/CEGuiBaseApplication.cpp
@@ -121,7 +121,8 @@
"", logFile);
// initialise resource system
- initialiseResourceGroupDirectories(dataPathPrefixOverride);
+ initDataPathPrefix(dataPathPrefixOverride);
+ initialiseResourceGroupDirectories();
initialiseDefaultResourceGroups();
const CEGUI::Rectf scrn(CEGUI::Vector2f(0, 0), d_renderer->getDisplaySize());
@@ -186,14 +187,12 @@
}
//----------------------------------------------------------------------------//
-void CEGuiBaseApplication::initialiseResourceGroupDirectories
- (const CEGUI::String& dataPathPrefixOverride)
+void CEGuiBaseApplication::initialiseResourceGroupDirectories()
{
// initialise the required dirs for the DefaultResourceProvider
CEGUI::DefaultResourceProvider* rp =
static_cast<CEGUI::DefaultResourceProvider*>
(CEGUI::System::getSingleton().getResourceProvider());
- initDataPathPrefix(dataPathPrefixOverride);
CEGUI::String dataPathPrefix(getDataPathPrefix());
/* for each resource type, set a resource group directory. We cast strings
diff --git a/samples_framework/src/CEGuiOgreBaseApplication.cpp b/samples_framework/src/CEGuiOgreBaseApplication.cpp
--- a/samples_framework/src/CEGuiOgreBaseApplication.cpp
+++ b/samples_framework/src/CEGuiOgreBaseApplication.cpp
@@ -140,14 +140,6 @@
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
- // start rendering via Ogre3D engine.
- CEGUI_TRY
- {
- d_ogreRoot->startRendering();
- }
- CEGUI_CATCH(...)
- {}
-
return true;
}
@@ -261,6 +253,18 @@
}
//----------------------------------------------------------------------------//
+void CEGuiOgreBaseApplication::run()
+{
+ // start rendering via Ogre3D engine.
+ CEGUI_TRY
+ {
+ d_ogreRoot->startRendering();
+ }
+ CEGUI_CATCH(...)
+ {}
+}
+
+//----------------------------------------------------------------------------//
void CEGuiOgreBaseApplication::setupDefaultConfigIfNeeded()
{
// Check if the config exists