diff --git a/Docs/src/manual/Ogre3.0.Changes.md b/Docs/src/manual/Ogre3.0.Changes.md index 811f2d8a909..6a467468ad0 100644 --- a/Docs/src/manual/Ogre3.0.Changes.md +++ b/Docs/src/manual/Ogre3.0.Changes.md @@ -18,13 +18,13 @@ When enabled, the project names will be `OgreNext` instead of `Ogre`. e.g. the f | Old Name | New Name | |----------------------------|--------------------------------| -| OgreMain.dll | OgreMain.dll | +| OgreMain.dll | OgreNextMain.dll | | OgreHlmsPbs.dll | OgreNextHlmsPbs.dll | | OgreHlmsUnlit.dll | OgreNextHlmsUnlit.dll | | OgreMeshLodGenerator.dll | OgreNextMeshLodGenerator.dll | | OgreOverlay.dll | OgreNextOverlay.dll | | OgreSceneFormat.dll | OgreNextSceneFormat.dll | -| libOgreMain.so | libOgreMain.so | +| libOgreMain.so | libOgreNextMain.so | | libOgreHlmsPbs.so | libOgreNextHlmsPbs.so | | libOgreHlmsUnlit.so | libOgreNextHlmsUnlit.so | | libOgreMeshLodGenerator.so | libOgreNextMeshLodGenerator.so | diff --git a/OgreMain/src/OgreHlms.cpp b/OgreMain/src/OgreHlms.cpp index fd4ad667370..73223d3ed43 100644 --- a/OgreMain/src/OgreHlms.cpp +++ b/OgreMain/src/OgreHlms.cpp @@ -2278,6 +2278,12 @@ namespace Ogre codeCache.shaders[i] = compileShaderCode( source[i], "", uniqueName, static_cast( i ), tid ); + + if( mDebugOutput ) + { + debugDumpFile.write( source[i].c_str(), + static_cast( source[i].size() ) ); + } } } diff --git a/README.md b/README.md index cfa92f219ae..50ebae79c3f 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,8 @@ pacman -S freeimage freetype2 libxaw libxrandr mesa zziplib cmake gcc We provide quick download-build scripts under the [Scripts/BuildScripts/output](Scripts/BuildScripts/output) folder. -You can download all of these scripts [as a compressed 7zip file](https://bintray.com/darksylinc/ogre-next/download_file?file_path=build_ogre_scripts-master.7z) +You can download all of these scripts [as a compressed 7zip file](https://github.com/OGRECave/ogre-next/releases/download/bin-releases/build_ogre_scripts-master.7z). +We also have an archive if you're looking for [scripts to build older versions](https://github.com/OGRECave/ogre-next/releases/bin-releases/). If you're on Linux, make sure to first install the dependencies (i.e. run the sudo apt-get above) diff --git a/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp b/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp index 94111900c82..908c50dd00b 100644 --- a/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp +++ b/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp @@ -909,6 +909,7 @@ namespace Ogre SAFE_DELETE( mDriverList ); mActiveD3DDriver = D3D11Driver(); mDevice.ReleaseAll(); + SAFE_DELETE( mVendorExtension ); LogManager::getSingleton().logMessage( "D3D11: Shutting down cleanly." ); SAFE_DELETE( mHardwareBufferManager ); SAFE_DELETE( mGpuProgramManager ); diff --git a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLPreprocessor.h b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLPreprocessor.h index 9d5c47f6160..a21b7c1b2ba 100644 --- a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLPreprocessor.h +++ b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLPreprocessor.h @@ -521,6 +521,16 @@ namespace Ogre */ char *Parse( const char *iSource, size_t iLength, size_t &oLength ); + /** Parse the input string as a preamble (i.e. to define a lot of enums). + @param iSource + The source text containing preamble macros. + @param iLength + The length of iSource text in characters. + @return + False on errors. True on success. + */ + bool ParsePreamble( const char *iSource, size_t iLength ); + /** * An error handler function type. * The default implementation just drops a note to stderr and diff --git a/RenderSystems/GL3Plus/src/GLSL/OgreGLSLPreprocessor.cpp b/RenderSystems/GL3Plus/src/GLSL/OgreGLSLPreprocessor.cpp index dbcb6845a73..5dbd8c55172 100644 --- a/RenderSystems/GL3Plus/src/GLSL/OgreGLSLPreprocessor.cpp +++ b/RenderSystems/GL3Plus/src/GLSL/OgreGLSLPreprocessor.cpp @@ -1437,4 +1437,10 @@ namespace Ogre return retval.Buffer; } + bool CPreprocessor::ParsePreamble( const char *iSource, size_t iLength ) + { + Token retval = Parse( Token( Token::TK_TEXT, iSource, iLength ) ); + return retval.Type != Token::TK_ERROR; + } + } // namespace Ogre diff --git a/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp b/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp index 8cf99c165de..9fcc5b90c47 100644 --- a/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp +++ b/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp @@ -163,7 +163,6 @@ namespace Ogre replaceVersionMacros(); // Mask out vulkan_layout() macros - size_t unusedVal = 0; const String preamble = "#define vulkan_layout(x)\n" "#define vulkan( x )\n" @@ -180,7 +179,7 @@ namespace Ogre "#define vkSampler2DArray( a, b ) a\n" "#define vkSampler3D( a, b ) a\n" "#define vkSamplerCube( a, b ) a\n"; - cpp.Parse( preamble.c_str(), preamble.size(), unusedVal ); + cpp.ParsePreamble( preamble.c_str(), preamble.size() ); // Pass all user-defined macros to preprocessor if( !mPreprocessorDefines.empty() ) @@ -240,6 +239,7 @@ namespace Ogre const char *src = mSource.c_str(); size_t src_len = mSource.size(); char *out = cpp.Parse( src, src_len, out_size ); + if( !out || !out_size ) { mCompileError = true; diff --git a/RenderSystems/Vulkan/include/Windowing/Android/OgreVulkanAndroidWindow.h b/RenderSystems/Vulkan/include/Windowing/Android/OgreVulkanAndroidWindow.h index c4dac6f8b6f..37b6c76dd08 100644 --- a/RenderSystems/Vulkan/include/Windowing/Android/OgreVulkanAndroidWindow.h +++ b/RenderSystems/Vulkan/include/Windowing/Android/OgreVulkanAndroidWindow.h @@ -82,7 +82,7 @@ namespace Ogre /// While this sounds convenient, beware that Swappy will often downgrade vSyncInterval /// until it finds something that can be met & sustained. /// That means if your game runs between 40fps and 60fps on a 60hz screen, after some time - /// swappy will downgrade vSyncInterval to 2 so that the game render at perfect 30fps. + /// Swappy will downgrade vSyncInterval to 2 so that the game renders at perfect 30fps. /// /// This may result in a better experience considering framerates jump a lot due to /// thermal throttling on phones. But it may also cause undesired or unexplainable diff --git a/Samples/Media/Hlms/Terra/Any/500.Structs_piece_vs_piece_ps.any b/Samples/Media/Hlms/Terra/Any/500.Structs_piece_vs_piece_ps.any index ea4e6717ae9..b270cb1de25 100644 --- a/Samples/Media/Hlms/Terra/Any/500.Structs_piece_vs_piece_ps.any +++ b/Samples/Media/Hlms/Terra/Any/500.Structs_piece_vs_piece_ps.any @@ -96,6 +96,7 @@ struct CellData @undefpiece( DeclareObjLightMask ) @property( hlms_fine_light_mask || hlms_forwardplus_fine_light_mask ) + // Currently unimplemented (also makes little sense since there's nothing fine granularity to do). @property( syntax == metal ) @piece( DeclareObjLightMask )uint objLightMask = 0xFFFFFFFFu;@end @else diff --git a/Samples/Media/Hlms/Terra/Any/800.VertexShader_piece_vs.any b/Samples/Media/Hlms/Terra/Any/800.VertexShader_piece_vs.any index 383e6e688f6..85d127d247f 100644 --- a/Samples/Media/Hlms/Terra/Any/800.VertexShader_piece_vs.any +++ b/Samples/Media/Hlms/Terra/Any/800.VertexShader_piece_vs.any @@ -136,11 +136,14 @@ @property( syntax == metal || lower_gpu_overhead ) @property( hlms_fine_light_mask || hlms_forwardplus_fine_light_mask ) - outVs.objLightMask = worldMaterialIdx[inVs_drawId].z; + // Currently unimplemented (also makes little sense since there's nothing fine granularity to do). + outVs.objLightMask = 0xFFFFFFFF; + // outVs.objLightMask = worldMaterialIdx[inVs_drawId].z; @end @property( use_planar_reflections ) - outVs.planarReflectionIdx = (ushort)(worldMaterialIdx[inVs_drawId].w); + #error "Unimplemented Feature: Using Terra as Planar Reflections" + // outVs.planarReflectionIdx = (ushort)(worldMaterialIdx[inVs_drawId].w); @end @else @property( (!hlms_shadowcaster || alpha_test) && !lower_gpu_overhead )