Skip to content

Commit

Permalink
Merge branch 'OGRECave:master' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
mosfet80 authored Jun 17, 2024
2 parents 7c94a95 + b349548 commit a684d65
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Docs/src/manual/Ogre3.0.Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 6 additions & 0 deletions OgreMain/src/OgreHlms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2278,6 +2278,12 @@ namespace Ogre

codeCache.shaders[i] =
compileShaderCode( source[i], "", uniqueName, static_cast<ShaderType>( i ), tid );

if( mDebugOutput )
{
debugDumpFile.write( source[i].c_str(),
static_cast<std::streamsize>( source[i].size() ) );
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
10 changes: 10 additions & 0 deletions RenderSystems/GL3Plus/include/GLSL/OgreGLSLPreprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions RenderSystems/GL3Plus/src/GLSL/OgreGLSLPreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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() )
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Samples/Media/Hlms/Terra/Any/800.VertexShader_piece_vs.any
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit a684d65

Please sign in to comment.