From 5d2a115a6de855bf38bc33a73bc01a7ea58475df Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sun, 26 Apr 2020 19:11:00 -0300 Subject: [PATCH] Do not dump shaders to disk in Release mode. It's unprofessional and newbies may also think it's necessary (it's not) Casing of "Media" folder should be consistent across platforms Fixed resources2.cfg file having wrong paths when installed as SDK --- CMake/InstallResources.cmake | 13 +++++++++++++ OgreMain/src/OgreHlms.cpp | 8 ++++++++ Samples/Media/CMakeLists.txt | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake index f506f0e3e35..a9e9da68904 100644 --- a/CMake/InstallResources.cmake +++ b/CMake/InstallResources.cmake @@ -67,6 +67,19 @@ elseif (UNIX) set(OGRE_CFG_INSTALL_PATH "share/OGRE") endif () +if( APPLE ) + if (OGRE_BUILD_PLATFORM_APPLE_IOS) + set( OGRE_MEDIA_PACKS_DIR "." ) + set( OGRE_MEDIA_TEXTURES_DIR "." ) + else() + set( OGRE_MEDIA_PACKS_DIR "Contents/Resources" ) + set( OGRE_MEDIA_TEXTURES_DIR "Contents/Resources" ) + endif() +else() + set( OGRE_MEDIA_PACKS_DIR "${OGRE_MEDIA_DIR_REL}/packs" ) + set( OGRE_MEDIA_TEXTURES_DIR "${OGRE_MEDIA_DIR_REL}/materials" ) +endif() + # configure plugins.cfg if (NOT OGRE_BUILD_RENDERSYSTEM_D3D11) set(OGRE_COMMENT_RENDERSYSTEM_D3D11 "#") diff --git a/OgreMain/src/OgreHlms.cpp b/OgreMain/src/OgreHlms.cpp index d8063f0dd2a..6748f66fc2e 100644 --- a/OgreMain/src/OgreHlms.cpp +++ b/OgreMain/src/OgreHlms.cpp @@ -247,8 +247,16 @@ namespace Ogre mShaderProfile( "unset!" ), mShaderSyntax( "unset!" ), mShaderFileExt( "unset!" ), + #if OGRE_DEBUG_MODE >= OGRE_DEBUG_MEDIUM mDebugOutput( true ), + #else + mDebugOutput( false ), + #endif + #if OGRE_DEBUG_MODE >= OGRE_DEBUG_HIGH mDebugOutputProperties( true ), + #else + mDebugOutputProperties( false ), + #endif mHighQuality( false ), mFastShaderBuildHack( false ), mDefaultDatablock( 0 ), diff --git a/Samples/Media/CMakeLists.txt b/Samples/Media/CMakeLists.txt index bdcf6a10c5a..c2e507f7fd7 100644 --- a/Samples/Media/CMakeLists.txt +++ b/Samples/Media/CMakeLists.txt @@ -13,7 +13,7 @@ # Set media target directory if (WIN32) - set(OGRE_MEDIA_PATH "media") + set(OGRE_MEDIA_PATH "Media") elseif (APPLE) set(OGRE_MEDIA_PATH "Media") elseif (UNIX)