Skip to content

Commit

Permalink
Do not dump shaders to disk in Release mode.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
darksylinc committed Apr 26, 2020
1 parent 06f1093 commit 5d2a115
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
13 changes: 13 additions & 0 deletions CMake/InstallResources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "#")
Expand Down
8 changes: 8 additions & 0 deletions OgreMain/src/OgreHlms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ),
Expand Down
2 changes: 1 addition & 1 deletion Samples/Media/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5d2a115

Please sign in to comment.