From 3258608d0629227e3ed0c5f70a367a5c686d9aa7 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 13 Jul 2022 17:10:49 -0700 Subject: [PATCH 1/5] Finale: Source hard-tocks Signed-off-by: methylDragon --- Changelog.md | 2 +- include/gz/rendering/base/base.hh.in | 2 +- include/gz/rendering/rendering.hh.in | 2 +- .../gz/rendering/ogre/OgreConversions.hh | 2 +- .../gz/rendering/ogre/OgreRTShaderSystem.hh | 2 +- ogre/include/gz/rendering/ogre/ogre.hh.in | 2 +- ogre/src/CMakeLists.txt | 2 +- ogre/src/OgreHeightmap.cc | 82 +++++++++---------- .../gz/rendering/ogre2/Ogre2Conversions.hh | 2 +- ogre2/include/gz/rendering/ogre2/ogre2.hh.in | 2 +- ogre2/src/CMakeLists.txt | 2 +- ogre2/src/Ogre2GzHlmsPbsPrivate.cc | 28 +++---- ogre2/src/Ogre2GzHlmsSharedPrivate.hh | 2 +- .../Ogre2GzHlmsSphericalClipMinDistance.cc | 8 +- ogre2/src/Ogre2GzHlmsTerraPrivate.cc | 28 +++---- ogre2/src/Ogre2GzHlmsUnlitPrivate.cc | 12 +-- ogre2/src/Ogre2Heightmap.cc | 2 +- ogre2/src/Ogre2Material.cc | 12 +-- ogre2/src/Ogre2RenderEngine.cc | 18 ++-- .../500.GzSolidColorStructs_piece_all.any | 4 +- .../SolidColor/800.GzSolidColor_piece_ps.any | 18 ++-- .../SolidColor/800.GzSolidColor_piece_vs.any | 12 +-- .../GzSphericalClipMinDistance_piece_vs.any | 10 +-- ...ericalClipMinDistanceStructs_piece_all.any | 10 +-- .../Terra/Any/800.PixelShader_piece_ps.any | 4 +- .../gz/100.gz_CustomWeights_piece_ps.any | 12 +-- .../programs/GLSL/plain_color_vs.glsl | 6 +- .../programs/Metal/plain_color_vs.metal | 6 +- .../media/materials/scripts/gpu_rays.material | 4 +- .../media/materials/scripts/picker.material | 4 +- .../media/materials/scripts/thermal.material | 4 +- .../Terra/Hlms/OgreHlmsTerraDatablock.h | 6 +- .../terrain/Terra/src/Hlms/OgreHlmsTerra.cpp | 16 ++-- .../Terra/src/Hlms/OgreHlmsTerraDatablock.cpp | 24 +++--- .../gz/rendering/optix/OptixConversions.hh | 2 +- optix/include/gz/rendering/optix/optix.hh.in | 2 +- 36 files changed, 178 insertions(+), 178 deletions(-) diff --git a/Changelog.md b/Changelog.md index 24dc2e4fe..43b577e89 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,7 +8,7 @@ ### Gazebo Rendering 6.3.1 (2022-04-13) -1. Revert OGRE-Next custom support and back to use IgnOGRE2 module +1. Revert OGRE-Next custom support and back to use GzOGRE2 module * [Pull request #605](https://github.com/gazebosim/gz-rendering/pull/605) ### Gazebo Rendering 6.3.0 (2022-04-06) diff --git a/include/gz/rendering/base/base.hh.in b/include/gz/rendering/base/base.hh.in index 4ffcf3d38..0bdf56e37 100644 --- a/include/gz/rendering/base/base.hh.in +++ b/include/gz/rendering/base/base.hh.in @@ -1,3 +1,3 @@ // Automatically generated #include -${ign_headers} +${gz_headers} diff --git a/include/gz/rendering/rendering.hh.in b/include/gz/rendering/rendering.hh.in index 9bd7cdda0..af2fd34e6 100644 --- a/include/gz/rendering/rendering.hh.in +++ b/include/gz/rendering/rendering.hh.in @@ -1,3 +1,3 @@ // Automatically generated //#include -${ign_headers} +${gz_headers} diff --git a/ogre/include/gz/rendering/ogre/OgreConversions.hh b/ogre/include/gz/rendering/ogre/OgreConversions.hh index a3f3b0067..762b67ae0 100644 --- a/ogre/include/gz/rendering/ogre/OgreConversions.hh +++ b/ogre/include/gz/rendering/ogre/OgreConversions.hh @@ -32,7 +32,7 @@ namespace gz { inline namespace GZ_RENDERING_VERSION_NAMESPACE { // - /// \addtogroup ign_rendering + /// \addtogroup gz_rendering /// \{ /// \brief Conversions Conversions.hh rendering/Conversions.hh diff --git a/ogre/include/gz/rendering/ogre/OgreRTShaderSystem.hh b/ogre/include/gz/rendering/ogre/OgreRTShaderSystem.hh index 2bcfd3280..38e613fb2 100644 --- a/ogre/include/gz/rendering/ogre/OgreRTShaderSystem.hh +++ b/ogre/include/gz/rendering/ogre/OgreRTShaderSystem.hh @@ -34,7 +34,7 @@ namespace gz // forward declaration class OgreRTShaderSystemPrivate; - /// \addtogroup ign_rendering + /// \addtogroup gz_rendering /// \{ /// \class OgreRTShaderSystem OgreRTShaderSystem.hh rendering/rendering.hh diff --git a/ogre/include/gz/rendering/ogre/ogre.hh.in b/ogre/include/gz/rendering/ogre/ogre.hh.in index 4ffcf3d38..0bdf56e37 100644 --- a/ogre/include/gz/rendering/ogre/ogre.hh.in +++ b/ogre/include/gz/rendering/ogre/ogre.hh.in @@ -1,3 +1,3 @@ // Automatically generated #include -${ign_headers} +${gz_headers} diff --git a/ogre/src/CMakeLists.txt b/ogre/src/CMakeLists.txt index bf77442d8..093301af3 100644 --- a/ogre/src/CMakeLists.txt +++ b/ogre/src/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries(${ogre_target} PRIVATE gz-plugin${GZ_PLUGIN_VER}::register ${OPENGL_LIBRARIES} - IgnOGRE::IgnOGRE + GzOGRE::GzOGRE ) # Build the unit tests diff --git a/ogre/src/OgreHeightmap.cc b/ogre/src/OgreHeightmap.cc index c3cdb6819..02478f43d 100644 --- a/ogre/src/OgreHeightmap.cc +++ b/ogre/src/OgreHeightmap.cc @@ -48,13 +48,13 @@ using Ogre::TechniqueType; /// A custom material generator that lets Gazebo use GLSL shaders /// (as opposed to the default Cg shaders provided by Ogre) for rendering /// terrain. -class IgnTerrainMatGen : public Ogre::TerrainMaterialGeneratorA +class GzTerrainMatGen : public Ogre::TerrainMaterialGeneratorA { /// \brief Constructor - public: IgnTerrainMatGen(); + public: GzTerrainMatGen(); /// \brief Destructor - public: virtual ~IgnTerrainMatGen(); + public: virtual ~GzTerrainMatGen(); /// \brief Shader model 2 profile target. public: class SM2Profile : @@ -404,7 +404,7 @@ class gz::rendering::OgreHeightmapPrivate #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11 /// \brief Pointer to the terrain material generator. - public: IgnTerrainMatGen *ignMatGen{nullptr}; + public: GzTerrainMatGen *gzMatGen{nullptr}; #endif }; @@ -1010,11 +1010,11 @@ void OgreHeightmap::CreateMaterial() #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11 // use default material // RTSS PSSM shadows compatible terrain material - if (!this->dataPtr->ignMatGen) - this->dataPtr->ignMatGen = new IgnTerrainMatGen(); + if (!this->dataPtr->gzMatGen) + this->dataPtr->gzMatGen = new GzTerrainMatGen(); auto ptr = Ogre::TerrainMaterialGeneratorPtr(); - ptr.bind(this->dataPtr->ignMatGen); + ptr.bind(this->dataPtr->gzMatGen); this->dataPtr->terrainGlobals->setDefaultMaterialGenerator(ptr); #else @@ -1040,7 +1040,7 @@ void OgreHeightmap::SetupShadows(bool _enableShadows) // Assume we get a shader model 2 material profile Ogre::TerrainMaterialGeneratorA::SM2Profile *matProfile; #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11 - matProfile = static_cast( + matProfile = static_cast( matGen->getActiveProfile()); #else matProfile = static_cast( @@ -1157,14 +1157,14 @@ MaterialPtr OgreHeightmap::Material() const ///////////////////////////////////////////////// ///////////////////////////////////////////////// -// IgnTerrainMatGen +// GzTerrainMatGen ///////////////////////////////////////////////// ///////////////////////////////////////////////// #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11 ///////////////////////////////////////////////// -IgnTerrainMatGen::IgnTerrainMatGen() +GzTerrainMatGen::GzTerrainMatGen() : TerrainMaterialGeneratorA() { /// \TODO(anyone) - This will have to be changed if TerrainMaterialGeneratorA @@ -1183,12 +1183,12 @@ IgnTerrainMatGen::IgnTerrainMatGen() } ///////////////////////////////////////////////// -IgnTerrainMatGen::~IgnTerrainMatGen() +GzTerrainMatGen::~GzTerrainMatGen() { } ///////////////////////////////////////////////// -IgnTerrainMatGen::SM2Profile::SM2Profile( +GzTerrainMatGen::SM2Profile::SM2Profile( Ogre::TerrainMaterialGenerator *_parent, const Ogre::String &_name, const Ogre::String &_desc) : TerrainMaterialGeneratorA::SM2Profile(_parent, _name, _desc) @@ -1197,7 +1197,7 @@ IgnTerrainMatGen::SM2Profile::SM2Profile( } ///////////////////////////////////////////////// -IgnTerrainMatGen::SM2Profile::~SM2Profile() +GzTerrainMatGen::SM2Profile::~SM2Profile() { // Because the base SM2Profile has no virtual destructor: delete this->mShaderGen; @@ -1205,7 +1205,7 @@ IgnTerrainMatGen::SM2Profile::~SM2Profile() } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::addTechnique( +void GzTerrainMatGen::SM2Profile::addTechnique( const Ogre::MaterialPtr &_mat, const Ogre::Terrain *_terrain, TechniqueType _tt) { @@ -1221,7 +1221,7 @@ void IgnTerrainMatGen::SM2Profile::addTechnique( if (hmgr.isLanguageSupported("glsl")) { this->mShaderGen = OGRE_NEW - IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL(); + GzTerrainMatGen::SM2Profile::ShaderHelperGLSL(); } else { @@ -1250,14 +1250,14 @@ void IgnTerrainMatGen::SM2Profile::addTechnique( // Doesn't delegate to the proper method otherwise Ogre::HighLevelGpuProgramPtr vprog = - ((IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL*)this->mShaderGen) + ((GzTerrainMatGen::SM2Profile::ShaderHelperGLSL*)this->mShaderGen) ->generateVertexProgram(this, _terrain, _tt); // DEBUG: std::cout << "VertShader[" << vprog->getName() << "]:\n" // << vprog->getSource() << "\n\n"; Ogre::HighLevelGpuProgramPtr fprog = - ((IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL*)this->mShaderGen) + ((GzTerrainMatGen::SM2Profile::ShaderHelperGLSL*)this->mShaderGen) ->generateFragmentProgram(this, _terrain, _tt); // DEBUG: std::cout << "FragShader[" << fprog->getName() << "]:\n" @@ -1347,7 +1347,7 @@ void IgnTerrainMatGen::SM2Profile::addTechnique( // generate() and generateForCompositeMap() are identical to // TerrainMaterialGeneratorA implementation, the only reason for repeating // them is that, unfortunately, addTechnique() is not declared virtual. -Ogre::MaterialPtr IgnTerrainMatGen::SM2Profile::generate( +Ogre::MaterialPtr GzTerrainMatGen::SM2Profile::generate( const Ogre::Terrain *_terrain) { // re-use old material if exists @@ -1408,7 +1408,7 @@ Ogre::MaterialPtr IgnTerrainMatGen::SM2Profile::generate( } ///////////////////////////////////////////////// -Ogre::MaterialPtr IgnTerrainMatGen::SM2Profile::generateForCompositeMap( +Ogre::MaterialPtr GzTerrainMatGen::SM2Profile::generateForCompositeMap( const Ogre::Terrain *_terrain) { // re-use old material if exists @@ -1442,19 +1442,19 @@ Ogre::MaterialPtr IgnTerrainMatGen::SM2Profile::generateForCompositeMap( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::UpdateParams(const Ogre::MaterialPtr &_mat, +void GzTerrainMatGen::SM2Profile::UpdateParams(const Ogre::MaterialPtr &_mat, const Ogre::Terrain *_terrain) { - static_cast( + static_cast( this->mShaderGen)->updateParams(this, _mat, _terrain, false); } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::UpdateParamsForCompositeMap( +void GzTerrainMatGen::SM2Profile::UpdateParamsForCompositeMap( const Ogre::MaterialPtr &_mat, const Ogre::Terrain *_terrain) { // Only tested for Ogre 1.11 & 1.12 - static_cast( + static_cast( this->mShaderGen)->updateParams(this, _mat, _terrain, true); } @@ -1466,7 +1466,7 @@ void IgnTerrainMatGen::SM2Profile::UpdateParamsForCompositeMap( ///////////////////////////////////////////////// Ogre::HighLevelGpuProgramPtr -IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVertexProgram( +GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVertexProgram( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt) { @@ -1485,7 +1485,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVertexProgram( ///////////////////////////////////////////////// Ogre::HighLevelGpuProgramPtr -IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgram( +GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgram( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt) { Ogre::HighLevelGpuProgramPtr ret = this->createFragmentProgram(_prof, @@ -1563,7 +1563,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgram( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateParams( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateParams( const SM2Profile *_prof, const Ogre::MaterialPtr &_mat, const Ogre::Terrain *_terrain, bool _compositeMap) { @@ -1597,7 +1597,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateParams( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL:: +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL:: generateVertexProgramSource(const SM2Profile *_prof, const Ogre::Terrain* _terrain, TechniqueType _tt, Ogre::StringStream &_outStream) @@ -1622,7 +1622,7 @@ generateVertexProgramSource(const SM2Profile *_prof, // TerrainMaterialGeneratorA::SM2Profile::ShaderHelperGLSL::generateVpHeader() // but is needed because generateVpDynamicShadowsParams() is not declared // virtual. -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpHeader( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpHeader( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt, Ogre::StringStream &_outStream) { @@ -1815,7 +1815,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpHeader( // This method is identical to // TerrainMaterialGeneratorA::SM2Profile::ShaderHelperGLSL::generateVpFooter() // but is needed because generateVpDynamicShadows() is not declared virtual. -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpFooter( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpFooter( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt, Ogre::StringStream &_outStream) { @@ -1846,7 +1846,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpFooter( ///////////////////////////////////////////////// void -IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpDynamicShadows( +GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpDynamicShadows( const SM2Profile *_prof, const Ogre::Terrain * /*_terrain*/, TechniqueType /*_tt*/, Ogre::StringStream &_outStream) { @@ -1881,7 +1881,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpDynamicShadows( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::defaultVpParams( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::defaultVpParams( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt, const Ogre::HighLevelGpuProgramPtr &_prog) { @@ -1935,7 +1935,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::defaultVpParams( } ///////////////////////////////////////////////// -unsigned int IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL:: +unsigned int GzTerrainMatGen::SM2Profile::ShaderHelperGLSL:: generateVpDynamicShadowsParams(unsigned int _texCoord, const SM2Profile *_prof, const Ogre::Terrain * /*_terrain*/, TechniqueType /*_tt*/, Ogre::StringStream &_outStream) @@ -1965,7 +1965,7 @@ generateVpDynamicShadowsParams(unsigned int _texCoord, const SM2Profile *_prof, } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpHeader( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpHeader( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt, Ogre::StringStream &_outStream) { @@ -2196,7 +2196,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpHeader( ///////////////////////////////////////////////// void -IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsParams( +GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsParams( Ogre::uint *_texCoord, Ogre::uint *_sampler, const SM2Profile *_prof, const Ogre::Terrain * /*_terrain*/, TechniqueType _tt, Ogre::StringStream &_outStream) @@ -2232,7 +2232,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsParams( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpLayer( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpLayer( const SM2Profile *_prof, const Ogre::Terrain * /*_terrain*/, TechniqueType _tt, Ogre::uint _layer, Ogre::StringStream &_outStream) @@ -2311,7 +2311,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpLayer( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpFooter( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpFooter( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt, Ogre::StringStream &_outStream) { @@ -2391,7 +2391,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpFooter( ///////////////////////////////////////////////// void -IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsHelpers( +GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsHelpers( const SM2Profile *_prof, const Ogre::Terrain * /*_terrain*/, TechniqueType /*_tt*/, Ogre::StringStream &_outStream) { @@ -2529,7 +2529,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsHelpers( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadows( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadows( const SM2Profile *_prof, const Ogre::Terrain * /*_terrain*/, TechniqueType /*_tt*/, Ogre::StringStream &_outStream) { @@ -2587,7 +2587,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadows( ///////////////////////////////////////////////// void -IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgramSource( +GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgramSource( const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt, Ogre::StringStream &_outStream) { @@ -2607,7 +2607,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgramSource( } ///////////////////////////////////////////////// -void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateVpParams( +void GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateVpParams( const SM2Profile *_prof, const Ogre::Terrain *_terrain, #if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 8 TechniqueType _tt, @@ -2647,7 +2647,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateVpParams( } ///////////////////////////////////////////////// -Ogre::String IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::GetChannel( +Ogre::String GzTerrainMatGen::SM2Profile::ShaderHelperGLSL::GetChannel( Ogre::uint _idx) { Ogre::uint rem = _idx % 4; diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh b/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh index bfcf87199..8d6bac902 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh @@ -44,7 +44,7 @@ namespace gz { inline namespace GZ_RENDERING_VERSION_NAMESPACE { // - /// \addtogroup ign_rendering + /// \addtogroup gz_rendering /// \{ /// \brief Conversions Conversions.hh rendering/Conversions.hh diff --git a/ogre2/include/gz/rendering/ogre2/ogre2.hh.in b/ogre2/include/gz/rendering/ogre2/ogre2.hh.in index 4ffcf3d38..0bdf56e37 100644 --- a/ogre2/include/gz/rendering/ogre2/ogre2.hh.in +++ b/ogre2/include/gz/rendering/ogre2/ogre2.hh.in @@ -1,3 +1,3 @@ // Automatically generated #include -${ign_headers} +${gz_headers} diff --git a/ogre2/src/CMakeLists.txt b/ogre2/src/CMakeLists.txt index fd5bf3253..51fca20c5 100644 --- a/ogre2/src/CMakeLists.txt +++ b/ogre2/src/CMakeLists.txt @@ -39,7 +39,7 @@ target_link_libraries(${ogre2_target} gz-plugin${GZ_PLUGIN_VER}::register ${OPENGL_LIBRARIES} terra - IgnOGRE2::IgnOGRE2) + GzOGRE2::GzOGRE2) set (versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX}) set (unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX}) diff --git a/ogre2/src/Ogre2GzHlmsPbsPrivate.cc b/ogre2/src/Ogre2GzHlmsPbsPrivate.cc index 7710b6210..d92036d52 100644 --- a/ogre2/src/Ogre2GzHlmsPbsPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsPbsPrivate.cc @@ -62,13 +62,13 @@ namespace Ogre Hlms *_hlms) { if (!_casterPass && - (this->ignOgreRenderingMode == IORM_SOLID_COLOR || - this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode == IORM_SOLID_COLOR || + this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED)) { - _hlms->_setProperty("ign_render_solid_color", 1); + _hlms->_setProperty("gz_render_solid_color", 1); - if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) - _hlms->_setProperty("ign_render_solid_color_textured", 1); + if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) + _hlms->_setProperty("gz_render_solid_color_textured", 1); } // Allow additional listener-only customizations to inject their stuff @@ -131,7 +131,7 @@ namespace Ogre { HlmsPbs::notifyPropertiesMergedPreGenerationStep(); - setProperty("IgnPerObjectDataSlot", kPerObjectDataBufferSlot); + setProperty("GzPerObjectDataSlot", kPerObjectDataBufferSlot); } ///////////////////////////////////////////////// @@ -146,8 +146,8 @@ namespace Ogre } if (_casterPass || - (this->ignOgreRenderingMode != IORM_SOLID_COLOR && - this->ignOgreRenderingMode != IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode != IORM_SOLID_COLOR && + this->gzOgreRenderingMode != IORM_SOLID_THERMAL_COLOR_TEXTURED)) { return; } @@ -163,8 +163,8 @@ namespace Ogre const uint32 instanceIdx = HlmsPbs::fillBuffersForV1( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->ignOgreRenderingMode == IORM_SOLID_COLOR || - this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || + this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { Vector4 customParam = @@ -177,7 +177,7 @@ namespace Ogre dataPtr[1] = customParam.y; dataPtr[2] = customParam.z; - if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && _queuedRenderable.renderable->hasCustomParameter(2u)) { GZ_ASSERT(customParam.w >= 0.0f, @@ -205,8 +205,8 @@ namespace Ogre const uint32 instanceIdx = HlmsPbs::fillBuffersForV2( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->ignOgreRenderingMode == IORM_SOLID_COLOR || - this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || + this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { Vector4 customParam; @@ -236,7 +236,7 @@ namespace Ogre dataPtr[2] = customParam.z; dataPtr[3] = customParam.w; - if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && _queuedRenderable.renderable->hasCustomParameter(2u)) { GZ_ASSERT(customParam.w >= 0.0f, diff --git a/ogre2/src/Ogre2GzHlmsSharedPrivate.hh b/ogre2/src/Ogre2GzHlmsSharedPrivate.hh index e965bbe83..85acd386f 100644 --- a/ogre2/src/Ogre2GzHlmsSharedPrivate.hh +++ b/ogre2/src/Ogre2GzHlmsSharedPrivate.hh @@ -108,7 +108,7 @@ namespace gz /// \brief See IgnOgreRenderingMode. Public variable. /// Modifying it takes change on the next render - public: IgnOgreRenderingMode ignOgreRenderingMode = IORM_NORMAL; + public: IgnOgreRenderingMode gzOgreRenderingMode = IORM_NORMAL; }; } } diff --git a/ogre2/src/Ogre2GzHlmsSphericalClipMinDistance.cc b/ogre2/src/Ogre2GzHlmsSphericalClipMinDistance.cc index 3489b6b5a..ae85fa205 100644 --- a/ogre2/src/Ogre2GzHlmsSphericalClipMinDistance.cc +++ b/ogre2/src/Ogre2GzHlmsSphericalClipMinDistance.cc @@ -45,8 +45,8 @@ void Ogre2GzHlmsSphericalClipMinDistance::preparePassHash( { const Ogre::int32 numClipPlanes = _hlms->_getProperty("hlms_pso_clip_distances"); - _hlms->_setProperty("ign_spherical_clip_min_distance", 1); - _hlms->_setProperty("ign_spherical_clip_idx", numClipPlanes); + _hlms->_setProperty("gz_spherical_clip_min_distance", 1); + _hlms->_setProperty("gz_spherical_clip_idx", numClipPlanes); _hlms->_setProperty("hlms_pso_clip_distances", numClipPlanes + 1); if (_hlms->getType() == Ogre::HLMS_UNLIT) @@ -54,7 +54,7 @@ void Ogre2GzHlmsSphericalClipMinDistance::preparePassHash( if (_hlms->_getProperty("hlms_global_clip_planes") == 0) { this->needsWorldPos = true; - _hlms->_setProperty("ign_spherical_clip_needs_worldPos", 1); + _hlms->_setProperty("gz_spherical_clip_needs_worldPos", 1); } } } @@ -87,7 +87,7 @@ float *Ogre2GzHlmsSphericalClipMinDistance::preparePassBuffer( _sceneManager->getCamerasInProgress().renderingCamera; const Ogre::Vector3 &camPos = camera->getDerivedPosition(); - // float4 ignMinClipDistance_ignCameraPos + // float4 gzMinClipDistance_gzCameraPos *_passBufferPtr++ = this->minDistanceClip; *_passBufferPtr++ = camPos.x; *_passBufferPtr++ = camPos.y; diff --git a/ogre2/src/Ogre2GzHlmsTerraPrivate.cc b/ogre2/src/Ogre2GzHlmsTerraPrivate.cc index 04772020e..607e40183 100644 --- a/ogre2/src/Ogre2GzHlmsTerraPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsTerraPrivate.cc @@ -59,13 +59,13 @@ namespace Ogre bool _dualParaboloid, SceneManager *_sceneManager, Hlms *_hlms) { if (!_casterPass && - (this->ignOgreRenderingMode == IORM_SOLID_COLOR || - this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode == IORM_SOLID_COLOR || + this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED)) { - _hlms->_setProperty("ign_render_solid_color", 1); + _hlms->_setProperty("gz_render_solid_color", 1); - if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) - _hlms->_setProperty("ign_render_solid_color_textured", 1); + if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) + _hlms->_setProperty("gz_render_solid_color_textured", 1); } // Allow additional listener-only customizations to inject their stuff @@ -128,7 +128,7 @@ namespace Ogre { HlmsTerra::notifyPropertiesMergedPreGenerationStep(); - setProperty("IgnPerObjectDataSlot", kPerObjectDataBufferSlot); + setProperty("GzPerObjectDataSlot", kPerObjectDataBufferSlot); } ///////////////////////////////////////////////// @@ -143,8 +143,8 @@ namespace Ogre } if (_casterPass || - (this->ignOgreRenderingMode != IORM_SOLID_COLOR && - this->ignOgreRenderingMode != IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode != IORM_SOLID_COLOR && + this->gzOgreRenderingMode != IORM_SOLID_THERMAL_COLOR_TEXTURED)) { return; } @@ -160,8 +160,8 @@ namespace Ogre const uint32 instanceIdx = HlmsTerra::fillBuffersForV1( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->ignOgreRenderingMode == IORM_SOLID_COLOR || - this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || + this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { const Ogre::Terra *terra = @@ -193,7 +193,7 @@ namespace Ogre dataPtr[1] = customParam.y; dataPtr[2] = customParam.z; - if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && terra->HasSolidColor(2u)) { GZ_ASSERT(customParam.w >= 0.0f, @@ -221,8 +221,8 @@ namespace Ogre const uint32 instanceIdx = HlmsTerra::fillBuffersForV2( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->ignOgreRenderingMode == IORM_SOLID_COLOR || - this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || + this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { const Ogre::Terra *terra = @@ -255,7 +255,7 @@ namespace Ogre dataPtr[2] = customParam.z; dataPtr[3] = customParam.w; - if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && terra->HasSolidColor(2u)) { GZ_ASSERT(customParam.w >= 0.0f, diff --git a/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc b/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc index 157a5019b..d0bc6338f 100644 --- a/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc @@ -56,9 +56,9 @@ namespace Ogre const CompositorShadowNode *_shadowNode, bool _casterPass, bool _dualParaboloid, SceneManager *_sceneManager, Hlms *_hlms) { - if (!_casterPass && this->ignOgreRenderingMode == IORM_SOLID_COLOR) + if (!_casterPass && this->gzOgreRenderingMode == IORM_SOLID_COLOR) { - _hlms->_setProperty("ign_render_solid_color", 1); + _hlms->_setProperty("gz_render_solid_color", 1); } // Allow additional listener-only customizations to inject their stuff @@ -121,7 +121,7 @@ namespace Ogre { HlmsUnlit::notifyPropertiesMergedPreGenerationStep(); - setProperty("IgnPerObjectDataSlot", kPerObjectDataBufferSlot); + setProperty("GzPerObjectDataSlot", kPerObjectDataBufferSlot); } ///////////////////////////////////////////////// @@ -135,7 +135,7 @@ namespace Ogre listener->hlmsTypeChanged(_casterPass, _commandBuffer, _datablock); } - if (_casterPass || this->ignOgreRenderingMode != IORM_SOLID_COLOR) + if (_casterPass || this->gzOgreRenderingMode != IORM_SOLID_COLOR) { return; } @@ -151,7 +151,7 @@ namespace Ogre const uint32 instanceIdx = HlmsUnlit::fillBuffersForV1( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if (this->ignOgreRenderingMode == IORM_SOLID_COLOR && !_casterPass) + if (this->gzOgreRenderingMode == IORM_SOLID_COLOR && !_casterPass) { Vector4 customParam; try @@ -192,7 +192,7 @@ namespace Ogre const uint32 instanceIdx = HlmsUnlit::fillBuffersForV2( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if (this->ignOgreRenderingMode == IORM_SOLID_COLOR && !_casterPass) + if (this->gzOgreRenderingMode == IORM_SOLID_COLOR && !_casterPass) { Vector4 customParam = _queuedRenderable.renderable->getCustomParameter(1u); diff --git a/ogre2/src/Ogre2Heightmap.cc b/ogre2/src/Ogre2Heightmap.cc index 866e82f70..f2ba6c595 100644 --- a/ogre2/src/Ogre2Heightmap.cc +++ b/ogre2/src/Ogre2Heightmap.cc @@ -369,7 +369,7 @@ void Ogre2Heightmap::Init() static_cast(blend->MinHeight()+ blend->FadeDistance()); } - datablock->setIgnWeightsHeights(minBlendHeights, maxBlendHeights); + datablock->setGzWeightsHeights(minBlendHeights, maxBlendHeights); } this->dataPtr->terra->setDatablock(datablock); diff --git a/ogre2/src/Ogre2Material.cc b/ogre2/src/Ogre2Material.cc index 3d363aaa1..784fc75f0 100644 --- a/ogre2/src/Ogre2Material.cc +++ b/ogre2/src/Ogre2Material.cc @@ -844,7 +844,7 @@ Ogre::MaterialPtr Ogre2Material::Material() this->dataPtr->ogreSolidColorShader = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram( - "_ign_" + this->name + "_solid_fs", + "_gz_" + this->name + "_solid_fs", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, this->dataPtr->shaderLanguageCode(graphicsApi), Ogre::GpuProgramType::GPT_FRAGMENT_PROGRAM); @@ -932,8 +932,8 @@ void Ogre2Material::SetTextureMapImpl(const std::string &_texture, if (img.BPP() == 8u) { std::string parentPath = common::parentPath(_texture); - // set a custom name for the rgb texture by appending ign_ prefix - std::string rgbTexName = "ign_" + baseName; + // set a custom name for the rgb texture by appending gz_ prefix + std::string rgbTexName = "gz_" + baseName; baseName = rgbTexName; auto tex = textureMgr->findTextureNoThrow(rgbTexName); if (!tex) @@ -1187,7 +1187,7 @@ void Ogre2Material::SetVertexShader(const std::string &_path) Ogre::HighLevelGpuProgramPtr vertexShader = Ogre::HighLevelGpuProgramManager::getSingletonPtr()->createProgram( - "_ign_" + baseName, + "_gz_" + baseName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, this->dataPtr->shaderLanguageCode( Ogre2RenderEngine::Instance()->GraphicsAPI()), @@ -1277,7 +1277,7 @@ void Ogre2Material::SetFragmentShader(const std::string &_path) std::string baseName = common::basename(_path); Ogre::HighLevelGpuProgramPtr fragmentShader = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram( - "_ign_" + baseName, + "_gz_" + baseName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, this->dataPtr->shaderLanguageCode( Ogre2RenderEngine::Instance()->GraphicsAPI()), @@ -1290,7 +1290,7 @@ void Ogre2Material::SetFragmentShader(const std::string &_path) // otherwise the parameters (uniforms) will not be set correctly std::string paramName("shader_reflection_pair_hint"); std::string paramValue = - "_ign_" + common::basename(this->dataPtr->vertexShaderPath); + "_gz_" + common::basename(this->dataPtr->vertexShaderPath); fragmentShader->setParameter(paramName, paramValue); } diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index aa1b406e1..1184010c3 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -76,13 +76,13 @@ class GZ_RENDERING_OGRE2_HIDDEN public: std::unique_ptr terraWorkspaceListener; /// \brief Custom PBS modifications - public: Ogre::Ogre2GzHlmsPbs *ignHlmsPbs{nullptr}; + public: Ogre::Ogre2GzHlmsPbs *gzHlmsPbs{nullptr}; /// \brief Custom Unlit modifications - public: Ogre::Ogre2GzHlmsUnlit *ignHlmsUnlit{nullptr}; + public: Ogre::Ogre2GzHlmsUnlit *gzHlmsUnlit{nullptr}; /// \brief Custom Terra modifications - public: Ogre::Ogre2GzHlmsTerra *ignHlmsTerra{nullptr}; + public: Ogre::Ogre2GzHlmsTerra *gzHlmsTerra{nullptr}; }; using namespace gz; @@ -788,7 +788,7 @@ void Ogre2RenderEngine::RegisterHlms() hlmsUnlit->setDebugOutputPath(false, false); hlmsUnlit->setListener(hlmsUnlit); - this->dataPtr->ignHlmsUnlit = hlmsUnlit; + this->dataPtr->gzHlmsUnlit = hlmsUnlit; } { @@ -833,7 +833,7 @@ void Ogre2RenderEngine::RegisterHlms() hlmsPbs->setDebugOutputPath(false, false); hlmsPbs->setListener(hlmsPbs); - dataPtr->ignHlmsPbs = hlmsPbs; + dataPtr->gzHlmsPbs = hlmsPbs; } { @@ -871,7 +871,7 @@ void Ogre2RenderEngine::RegisterHlms() this->dataPtr->terraWorkspaceListener.reset( new Ogre::TerraWorkspaceListener(hlmsTerra)); - this->dataPtr->ignHlmsTerra = hlmsTerra; + this->dataPtr->gzHlmsTerra = hlmsTerra; } } @@ -1085,9 +1085,9 @@ Ogre::v1::OverlaySystem *Ogre2RenderEngine::OverlaySystem() const void Ogre2RenderEngine::SetIgnOgreRenderingMode( IgnOgreRenderingMode renderingMode) { - this->dataPtr->ignHlmsPbs->ignOgreRenderingMode = renderingMode; - this->dataPtr->ignHlmsUnlit->ignOgreRenderingMode = renderingMode; - this->dataPtr->ignHlmsTerra->ignOgreRenderingMode = renderingMode; + this->dataPtr->gzHlmsPbs->gzOgreRenderingMode = renderingMode; + this->dataPtr->gzHlmsUnlit->gzOgreRenderingMode = renderingMode; + this->dataPtr->gzHlmsTerra->gzOgreRenderingMode = renderingMode; } ///////////////////////////////////////////////// diff --git a/ogre2/src/media/Hlms/Gz/SolidColor/500.GzSolidColorStructs_piece_all.any b/ogre2/src/media/Hlms/Gz/SolidColor/500.GzSolidColorStructs_piece_all.any index 613b1dddb..b2d559589 100644 --- a/ogre2/src/media/Hlms/Gz/SolidColor/500.GzSolidColorStructs_piece_all.any +++ b/ogre2/src/media/Hlms/Gz/SolidColor/500.GzSolidColorStructs_piece_all.any @@ -1,8 +1,8 @@ // Used by SegmentedCamera & SelectionBuffer -@property( ign_render_solid_color ) +@property( gz_render_solid_color ) @piece( custom_VStoPS_solid_color ) - FLAT_INTERPOLANT( float4 ignSolidColour, @counter(texcoord) ); + FLAT_INTERPOLANT( float4 gzSolidColour, @counter(texcoord) ); @end @end diff --git a/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_ps.any b/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_ps.any index 3a51e7f25..4bd1c261f 100644 --- a/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_ps.any +++ b/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_ps.any @@ -1,11 +1,11 @@ -@property( ign_render_solid_color ) +@property( gz_render_solid_color ) @piece( custom_ps_posExecution_solid_color ) - @property( ign_render_solid_color_textured ) - if( inPs.ignSolidColour.w >= 0.0f ) + @property( gz_render_solid_color_textured ) + if( inPs.gzSolidColour.w >= 0.0f ) { - outPs_colour0 = inPs.ignSolidColour; + outPs_colour0 = inPs.gzSolidColour; } else { @@ -14,15 +14,15 @@ samplerState@value(diffuse_map_sampler), UV_DIFFUSE( inPs.uv@value(uv_diffuse).xy ), texIndex_diffuseIdx ); - outPs_colour0 = float4( inPs.ignSolidColour.xyz, - -inPs.ignSolidColour.w - 0.5f ) * diffuse; + outPs_colour0 = float4( inPs.gzSolidColour.xyz, + -inPs.gzSolidColour.w - 0.5f ) * diffuse; @else - outPs_colour0 = float4( inPs.ignSolidColour.xyz, - -inPs.ignSolidColour.w - 0.5f ); + outPs_colour0 = float4( inPs.gzSolidColour.xyz, + -inPs.gzSolidColour.w - 0.5f ); @end } @else - outPs_colour0 = inPs.ignSolidColour; + outPs_colour0 = inPs.gzSolidColour; @end @end diff --git a/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_vs.any b/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_vs.any index 949eef2b0..01dec886e 100644 --- a/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_vs.any +++ b/ogre2/src/media/Hlms/Gz/SolidColor/800.GzSolidColor_piece_vs.any @@ -1,25 +1,25 @@ -@property( ign_render_solid_color ) +@property( gz_render_solid_color ) @property( syntax != metal ) @piece( custom_vs_uniformDeclaration_solid_color ) // Uniforms that change per Item/Entity - CONST_BUFFER( IgnPerObjectData, @value(IgnPerObjectDataSlot) ) + CONST_BUFFER( GzPerObjectData, @value(GzPerObjectDataSlot) ) { @property( fast_shader_build_hack ) - float4 ignPerObjectData[2]; + float4 gzPerObjectData[2]; @else - float4 ignPerObjectData[4096]; + float4 gzPerObjectData[4096]; @end }; @end @else @piece( custom_vs_uniformDeclaration_solid_color ) - , constant float4 *ignPerObjectData [[buffer(CONST_SLOT_START+@value(IgnPerObjectDataSlot))]] + , constant float4 *gzPerObjectData [[buffer(CONST_SLOT_START+@value(GzPerObjectDataSlot))]] @end @end @piece( custom_vs_posExecution_solid_color ) - outVs.ignSolidColour = ignPerObjectData[inVs_drawId]; + outVs.gzSolidColour = gzPerObjectData[inVs_drawId]; @end @end diff --git a/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/GzSphericalClipMinDistance_piece_vs.any b/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/GzSphericalClipMinDistance_piece_vs.any index 10888ca8a..0966176ad 100644 --- a/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/GzSphericalClipMinDistance_piece_vs.any +++ b/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/GzSphericalClipMinDistance_piece_vs.any @@ -1,6 +1,6 @@ -@property( ign_spherical_clip_min_distance ) +@property( gz_spherical_clip_min_distance ) @piece( custom_vs_posExecution_spherical_clip_min_distance ) - @property( ign_spherical_clip_needs_worldPos ) + @property( gz_spherical_clip_needs_worldPos ) // Unlit didn't declare this float3 worldPos = (gl_Position * passBuf.invViewProj).xyz; @end @@ -8,8 +8,8 @@ // Ogre 2.2 should use outVs_clipDistanceN for compatibility with all // APIs // Rare case of geometry without normals. - outVs_clipDistance[@value(ign_spherical_clip_idx)] = - distance( worldPos.xyz, passBuf.ignCameraPos.xyz ) - - passBuf.ignMinClipDistance; + outVs_clipDistance[@value(gz_spherical_clip_idx)] = + distance( worldPos.xyz, passBuf.gzCameraPos.xyz ) - + passBuf.gzMinClipDistance; @end @end diff --git a/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/SphericalClipMinDistanceStructs_piece_all.any b/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/SphericalClipMinDistanceStructs_piece_all.any index 9d58478da..9ab799872 100644 --- a/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/SphericalClipMinDistanceStructs_piece_all.any +++ b/ogre2/src/media/Hlms/Gz/SphericalClipMinDistance/SphericalClipMinDistanceStructs_piece_all.any @@ -1,10 +1,10 @@ -@property( ign_spherical_clip_min_distance ) +@property( gz_spherical_clip_min_distance ) @piece( custom_passBuffer_spherical_clip_min_distance ) - #define ignMinClipDistance ignMinClipDistance_ignCameraPos.x - #define ignCameraPos ignMinClipDistance_ignCameraPos.yzw - float4 ignMinClipDistance_ignCameraPos; + #define gzMinClipDistance gzMinClipDistance_gzCameraPos.x + #define gzCameraPos gzMinClipDistance_gzCameraPos.yzw + float4 gzMinClipDistance_gzCameraPos; - @property( ign_spherical_clip_needs_worldPos ) + @property( gz_spherical_clip_needs_worldPos ) float4x4 invViewProj; @end @end diff --git a/ogre2/src/media/Hlms/Terra/Any/800.PixelShader_piece_ps.any b/ogre2/src/media/Hlms/Terra/Any/800.PixelShader_piece_ps.any index 2abb60a4e..68bb2c045 100644 --- a/ogre2/src/media/Hlms/Terra/Any/800.PixelShader_piece_ps.any +++ b/ogre2/src/media/Hlms/Terra/Any/800.PixelShader_piece_ps.any @@ -100,12 +100,12 @@ @property( !detail_maps_diffuse && !detail_maps_normal ) float4 detailWeights = float4( 0.25f, 0.25f, 0.25f, 0.25f ); - @insertpiece( ign_weights ) + @insertpiece( gz_weights ) @else // GZ CUSTOMIZE BEGIN //pixelData.diffuse.xyz *= (detailCol0.xyz * detailWeights.x + detailCol1.xyz * detailWeights.y) + // (detailCol2.xyz * detailWeights.z + detailCol3.xyz * detailWeights.w); - @insertpiece( ign_weights ) + @insertpiece( gz_weights ) // GZ CUSTOMIZE END @end diff --git a/ogre2/src/media/Hlms/Terra/gz/100.gz_CustomWeights_piece_ps.any b/ogre2/src/media/Hlms/Terra/gz/100.gz_CustomWeights_piece_ps.any index 5fe900a76..20d0eeef4 100644 --- a/ogre2/src/media/Hlms/Terra/gz/100.gz_CustomWeights_piece_ps.any +++ b/ogre2/src/media/Hlms/Terra/gz/100.gz_CustomWeights_piece_ps.any @@ -1,21 +1,21 @@ #include "/media/matias/Datos/SyntaxHighlightingMisc.h" -// Look for all pieces with "ign_" prefix when updating Terra to +// Look for all pieces with "gz_" prefix when updating Terra to // a new version -@piece( ign_weights ) +@piece( gz_weights ) detailWeights = float4( 0.0f, 0.0f, 0.0f, 0.0f ); - @property( ign_weight0 ) + @property( gz_weight0 ) detailWeights.x = smoothstep( material.ignWeightsMinHeight.x, material.ignWeightsMaxHeight.x, inPs.localHeight ); @end - @property( ign_weight1 ) + @property( gz_weight1 ) detailWeights.y = smoothstep( material.ignWeightsMinHeight.y, material.ignWeightsMaxHeight.y, inPs.localHeight ); @end - @property( ign_weight2 ) + @property( gz_weight2 ) detailWeights.z = smoothstep( material.ignWeightsMinHeight.z, material.ignWeightsMaxHeight.z, inPs.localHeight ); @end - @property( ign_weight3 ) + @property( gz_weight3 ) detailWeights.w = smoothstep( material.ignWeightsMinHeight.w, material.ignWeightsMaxHeight.w, inPs.localHeight ); @end diff --git a/ogre2/src/media/materials/programs/GLSL/plain_color_vs.glsl b/ogre2/src/media/materials/programs/GLSL/plain_color_vs.glsl index 68a9047da..56f2c0fdb 100644 --- a/ogre2/src/media/materials/programs/GLSL/plain_color_vs.glsl +++ b/ogre2/src/media/materials/programs/GLSL/plain_color_vs.glsl @@ -20,7 +20,7 @@ in vec4 vertex; uniform mat4 worldViewProj; uniform mat4 worldView; -uniform float ignMinClipDistance; +uniform float gzMinClipDistance; out gl_PerVertex { @@ -33,13 +33,13 @@ void main() // Calculate output position gl_Position = worldViewProj * vertex; - if( ignMinClipDistance > 0.0f ) + if( gzMinClipDistance > 0.0f ) { // Frustum is rectangular; but the minimum lidar distance is spherical, // so we can't rely on near plane to clip geometry that is too close, // we have to do it by hand vec3 viewSpacePos = (worldView * vertex).xyz; - gl_ClipDistance[0] = length( viewSpacePos.xyz ) - ignMinClipDistance; + gl_ClipDistance[0] = length( viewSpacePos.xyz ) - gzMinClipDistance; } else { diff --git a/ogre2/src/media/materials/programs/Metal/plain_color_vs.metal b/ogre2/src/media/materials/programs/Metal/plain_color_vs.metal index 6b0ee7be8..a8d2d48e5 100644 --- a/ogre2/src/media/materials/programs/Metal/plain_color_vs.metal +++ b/ogre2/src/media/materials/programs/Metal/plain_color_vs.metal @@ -33,7 +33,7 @@ struct Params { float4x4 worldViewProj; float4x4 worldView; - float ignMinClipDistance; + float gzMinClipDistance; }; vertex PS_INPUT main_metal @@ -46,13 +46,13 @@ vertex PS_INPUT main_metal outVs.gl_Position = ( p.worldViewProj * input.position ).xyzw; - if( p.ignMinClipDistance > 0.0f ) + if( p.gzMinClipDistance > 0.0f ) { // Frustum is rectangular; but the minimum lidar distance is spherical, // so we can't rely on near plane to clip geometry that is too close, // we have to do it by hand float3 viewSpacePos = (p.worldView * input.position).xyz; - outVs.gl_ClipDistance[0] = length( viewSpacePos.xyz ) - p.ignMinClipDistance; + outVs.gl_ClipDistance[0] = length( viewSpacePos.xyz ) - p.gzMinClipDistance; } else { diff --git a/ogre2/src/media/materials/scripts/gpu_rays.material b/ogre2/src/media/materials/scripts/gpu_rays.material index 0d50ca9c5..bb0eeff85 100644 --- a/ogre2/src/media/materials/scripts/gpu_rays.material +++ b/ogre2/src/media/materials/scripts/gpu_rays.material @@ -180,7 +180,7 @@ vertex_program laser_retro_vs_GLSL glsl { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix - param_named ignMinClipDistance float 0.0 + param_named gzMinClipDistance float 0.0 } } @@ -204,7 +204,7 @@ vertex_program laser_retro_vs_Metal metal { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix - param_named ignMinClipDistance float 0.0 + param_named gzMinClipDistance float 0.0 } } diff --git a/ogre2/src/media/materials/scripts/picker.material b/ogre2/src/media/materials/scripts/picker.material index fdc4d4bc1..c61b3b6f3 100644 --- a/ogre2/src/media/materials/scripts/picker.material +++ b/ogre2/src/media/materials/scripts/picker.material @@ -8,7 +8,7 @@ vertex_program plaincolor_vs_GLSL glsl { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix - param_named ignMinClipDistance float 0.0 + param_named gzMinClipDistance float 0.0 } } @@ -22,7 +22,7 @@ vertex_program plaincolor_vs_Metal metal { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix - param_named ignMinClipDistance float 0.0 + param_named gzMinClipDistance float 0.0 } } diff --git a/ogre2/src/media/materials/scripts/thermal.material b/ogre2/src/media/materials/scripts/thermal.material index c6be0f2e1..f5e8bb64c 100644 --- a/ogre2/src/media/materials/scripts/thermal.material +++ b/ogre2/src/media/materials/scripts/thermal.material @@ -97,7 +97,7 @@ vertex_program heat_source_vs_GLSL glsl { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix - param_named ignMinClipDistance float 0.0 + param_named gzMinClipDistance float 0.0 } } @@ -121,7 +121,7 @@ vertex_program heat_source_vs_Metal metal { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix - param_named ignMinClipDistance float 0.0 + param_named gzMinClipDistance float 0.0 } } diff --git a/ogre2/src/terrain/Terra/include/Terra/Hlms/OgreHlmsTerraDatablock.h b/ogre2/src/terrain/Terra/include/Terra/Hlms/OgreHlmsTerraDatablock.h index bdfb1e8df..c91d87a33 100644 --- a/ogre2/src/terrain/Terra/include/Terra/Hlms/OgreHlmsTerraDatablock.h +++ b/ogre2/src/terrain/Terra/include/Terra/Hlms/OgreHlmsTerraDatablock.h @@ -179,8 +179,8 @@ namespace Ogre //uint16 mTexIndices[NUM_TERRA_TEXTURE_TYPES]; // GZ CUSTOMIZE BEGIN - float mIgnWeightsMinHeight[4]; - float mIgnWeightsMaxHeight[4]; + float mGzWeightsMinHeight[4]; + float mGzWeightsMaxHeight[4]; // GZ CUSTOMIZE END /// @see TerraBrdf::TerraBrdf @@ -244,7 +244,7 @@ namespace Ogre uint32 getBrdf(void) const; // GZ CUSTOMIZE BEGIN - void setIgnWeightsHeights( const Vector4 &ignWeightsMinHeight, + void setGzWeightsHeights( const Vector4 &ignWeightsMinHeight, const Vector4 &ignWeightsMaxHeight ); using HlmsTerraBaseTextureDatablock::setTexture; void setTexture( TerraTextureTypes texUnit, const String &name, diff --git a/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp b/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp index 1b5ba8bd4..35e7c09c9 100644 --- a/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp +++ b/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerra.cpp @@ -380,15 +380,15 @@ namespace Ogre // GZ CUSTOMIZE BEGIN for( size_t i = 0u; i < 4u; ++i ) { - const IdString c_ignWeightProperties[4] = { - "ign_weight0", - "ign_weight1", - "ign_weight2", - "ign_weight3", + const IdString c_gzWeightProperties[4] = { + "gz_weight0", + "gz_weight1", + "gz_weight2", + "gz_weight3", }; - setProperty( c_ignWeightProperties[i], - fabsf( datablock->mIgnWeightsMinHeight[i] - - datablock->mIgnWeightsMaxHeight[i] ) >= 1e-6f ); + setProperty( c_gzWeightProperties[i], + fabsf( datablock->mGzWeightsMinHeight[i] - + datablock->mGzWeightsMaxHeight[i] ) >= 1e-6f ); } // GZ CUSTOMIZE END diff --git a/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp b/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp index 19355c902..8a194eb5d 100644 --- a/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp +++ b/ogre2/src/terrain/Terra/src/Hlms/OgreHlmsTerraDatablock.cpp @@ -66,8 +66,8 @@ namespace Ogre mkDr( 0.318309886f ), mkDg( 0.318309886f ), mkDb( 0.318309886f ), //Max Diffuse = 1 / PI mShadowConstantBiasGpu( 0.0f ), // GZ CUSTOMIZE BEGIN - mIgnWeightsMinHeight{ 0.0f, 0.0f, 0.0f, 0.0f }, - mIgnWeightsMaxHeight{ 0.0f, 0.0f, 0.0f, 0.0f }, + mGzWeightsMinHeight{ 0.0f, 0.0f, 0.0f, 0.0f }, + mGzWeightsMaxHeight{ 0.0f, 0.0f, 0.0f, 0.0f }, // GZ CUSTOMIZE END mBrdf( TerraBrdf::Default ) { @@ -164,13 +164,13 @@ namespace Ogre detailsOffsetScale[i] = mDetailsOffsetScale[i]; // GZ CUSTOMIZE BEGIN - const size_t sizeOfIgnData = sizeof( mIgnWeightsMinHeight ) + sizeof( mIgnWeightsMinHeight ); + const size_t sizeOfGzData = sizeof( mGzWeightsMinHeight ) + sizeof( mGzWeightsMinHeight ); memcpy( dstPtr, &mkDr, MaterialSizeInGpu - numOffsetScale * sizeof( float4 ) - sizeof( mTexIndices ) - - sizeOfIgnData ); + sizeOfGzData ); dstPtr += MaterialSizeInGpu - numOffsetScale * sizeof( float4 ) - sizeof( mTexIndices ) - - sizeOfIgnData; + sizeOfGzData; // GZ CUSTOMIZE END memcpy( dstPtr, &detailsOffsetScale, numOffsetScale * sizeof( float4 ) ); @@ -180,8 +180,8 @@ namespace Ogre dstPtr += sizeof( texIndices ); // GZ CUSTOMIZE BEGIN - memcpy( dstPtr, mIgnWeightsMinHeight, sizeOfIgnData ); - dstPtr += sizeOfIgnData; + memcpy( dstPtr, mGzWeightsMinHeight, sizeOfGzData ); + dstPtr += sizeOfGzData; // GZ CUSTOMIZE END } //----------------------------------------------------------------------------------- @@ -279,18 +279,18 @@ namespace Ogre } //----------------------------------------------------------------------------------- // GZ CUSTOMIZE BEGIN - void HlmsTerraDatablock::setIgnWeightsHeights( const Vector4 &ignWeightsMinHeight, + void HlmsTerraDatablock::setGzWeightsHeights( const Vector4 &ignWeightsMinHeight, const Vector4 &ignWeightsMaxHeight ) { bool bNeedsFlushing = false; for( size_t i = 0u; i < 4u; ++i ) { const bool bWasDisabled = - fabsf( mIgnWeightsMinHeight[i] - mIgnWeightsMaxHeight[i] ) >= 1e-6f; - mIgnWeightsMinHeight[i] = ignWeightsMinHeight[i]; - mIgnWeightsMaxHeight[i] = ignWeightsMaxHeight[i]; + fabsf( mGzWeightsMinHeight[i] - mGzWeightsMaxHeight[i] ) >= 1e-6f; + mGzWeightsMinHeight[i] = ignWeightsMinHeight[i]; + mGzWeightsMaxHeight[i] = ignWeightsMaxHeight[i]; const bool bIsDisabled = - fabsf( mIgnWeightsMinHeight[i] - mIgnWeightsMaxHeight[i] ) >= 1e-6f; + fabsf( mGzWeightsMinHeight[i] - mGzWeightsMaxHeight[i] ) >= 1e-6f; bNeedsFlushing |= bWasDisabled != bIsDisabled; } if( bNeedsFlushing ) diff --git a/optix/include/gz/rendering/optix/OptixConversions.hh b/optix/include/gz/rendering/optix/OptixConversions.hh index f2e777708..5d673657f 100644 --- a/optix/include/gz/rendering/optix/OptixConversions.hh +++ b/optix/include/gz/rendering/optix/OptixConversions.hh @@ -31,7 +31,7 @@ namespace gz { inline namespace GZ_RENDERING_VERSION_NAMESPACE { // - /// \addtogroup ign_rendering + /// \addtogroup gz_rendering /// \{ /// \brief Conversions Conversions.hh rendering/Conversions.hh diff --git a/optix/include/gz/rendering/optix/optix.hh.in b/optix/include/gz/rendering/optix/optix.hh.in index 4ffcf3d38..0bdf56e37 100644 --- a/optix/include/gz/rendering/optix/optix.hh.in +++ b/optix/include/gz/rendering/optix/optix.hh.in @@ -1,3 +1,3 @@ // Automatically generated #include -${ign_headers} +${gz_headers} From ca9e852b98fd3d758307e26be64d45dc5df926c8 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 13 Jul 2022 17:25:46 -0700 Subject: [PATCH 2/5] Finale: Tick-tock IgnOgreRenderingMode Signed-off-by: methylDragon --- Migration.md | 3 +++ .../ogre2/Ogre2GzOgreRenderingMode.hh | 19 +++++++++----- .../gz/rendering/ogre2/Ogre2RenderEngine.hh | 9 +++++-- ogre2/src/Ogre2GpuRays.cc | 8 +++--- ogre2/src/Ogre2GzHlmsPbsPrivate.cc | 26 +++++++++---------- ogre2/src/Ogre2GzHlmsPbsPrivate.hh | 2 +- ogre2/src/Ogre2GzHlmsSharedPrivate.hh | 6 ++--- ogre2/src/Ogre2GzHlmsTerraPrivate.cc | 26 +++++++++---------- ogre2/src/Ogre2GzHlmsTerraPrivate.hh | 2 +- ogre2/src/Ogre2GzHlmsUnlitPrivate.cc | 8 +++--- ogre2/src/Ogre2GzHlmsUnlitPrivate.hh | 2 +- ogre2/src/Ogre2MaterialSwitcher.cc | 6 ++--- ogre2/src/Ogre2RenderEngine.cc | 4 +-- .../src/Ogre2SegmentationMaterialSwitcher.cc | 6 ++--- ogre2/src/Ogre2ThermalCamera.cc | 6 ++--- ogre2/src/terrain/Terra/CMakeLists.txt | 2 +- ogre2/src/terrain/Terra/include/Terra/Terra.h | 12 ++++----- 17 files changed, 80 insertions(+), 67 deletions(-) diff --git a/Migration.md b/Migration.md index a68fc17f6..921807796 100644 --- a/Migration.md +++ b/Migration.md @@ -27,6 +27,9 @@ release will remove the deprecated code. 3. `IGN_VISIBILITY_SELECTION` 4. `IGN_VISIBILITY_GUI` 5. `IGN_VISIBILITY_SELECTABLE` +7. The `IgnRenderingMode` enum is deprecated and will be removed in future versions. Use `GzRenderingMode` instead. + 1. Similarly, the `IORM_` prefixed enum values are deprecated. Use the `GORM_` prefix instead. + 2. Also, `Ogre2RenderEngine->SetIgnOgreRenderingMode` is deprecated and will be removed. Use `Ogre2RenderEngine->SetGzOgreRenderingMode` instead. ### Breaking Changes diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh index b7b9f3bad..9bc514861 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh @@ -29,27 +29,32 @@ namespace gz /// \brief Rendering modes so that GzHlms implementations /// follow alternate code paths or extra customizations /// when they're enabled - enum IgnOgreRenderingMode + enum GzOgreRenderingMode { /// \brief Normal rendering - IORM_NORMAL, + GORM_NORMAL = 0, + IORM_NORMAL = 0, // TODO(CH3): Deprecated. Remove on tock. /// \brief Render a solid color explicit per object. /// Used by e.g. Segmentation camera mode - IORM_SOLID_COLOR, + GORM_SOLID_COLOR = 1, + IORM_SOLID_COLOR = 1, // TODO(CH3): Deprecated. Remove on tock. - /// \brief Like IORM_SOLID_COLOR, but if CustomParameter 2u + /// \brief Like GORM_SOLID_COLOR, but if CustomParameter 2u /// is present, raw diffuse texture will be multiplied against /// the solid colour. /// - /// Also Unlit will behave as if IORM_NORMAL + /// Also Unlit will behave as if GORM_NORMAL /// /// Used by thermal camera - IORM_SOLID_THERMAL_COLOR_TEXTURED, + GORM_SOLID_THERMAL_COLOR_TEXTURED = 2, + IORM_SOLID_THERMAL_COLOR_TEXTURED = 2, // TODO(CH3): Deprecated. Remove on tock. /// \brief Total number of rendering modes - IORM_COUNT, + GORM_COUNT = 3, + IORM_COUNT = 3, // TODO(CH3): Deprecated. Remove on tock. }; + using IgnOgreRenderingMode GZ_DEPRECATED(7) = GzOgreRenderingMode; // TODO(CH3): Deprecated. Remove on tock. } // namespace GZ_RENDERING_VERSION_NAMESPACE } // namespace rendering } // namespace gz diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh b/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh index 234bd4a38..5dd30eb38 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh @@ -193,10 +193,15 @@ namespace gz public: Ogre::v1::OverlaySystem *OverlaySystem() const; /// \internal - /// \brief Sets the current rendering mode. See IgnOgreRenderingMode + /// \brief Sets the current rendering mode. See GzOgreRenderingMode /// and see Ogre::GzHlmsPbs /// \param[in] renderingMode - public: void SetIgnOgreRenderingMode(IgnOgreRenderingMode renderingMode); + public: void SetGzOgreRenderingMode(GzOgreRenderingMode renderingMode); + // TODO(CH3): Deprecated. Remove on tock. + public: + inline void GZ_DEPRECATED(7) SetIgnOgreRenderingMode(GzOgreRenderingMode renderingMode){ + return SetGzOgreRenderingMode(renderingMode); + } /// \internal /// \brief Get a pointer to the Pbs listener that adds terra shadows. diff --git a/ogre2/src/Ogre2GpuRays.cc b/ogre2/src/Ogre2GpuRays.cc index 747023472..fb13651cf 100644 --- a/ogre2/src/Ogre2GpuRays.cc +++ b/ogre2/src/Ogre2GpuRays.cc @@ -219,7 +219,7 @@ void Ogre2LaserRetroMaterialSwitcher::passPreExecute( return; auto engine = Ogre2RenderEngine::Instance(); - engine->SetIgnOgreRenderingMode(IORM_SOLID_COLOR); + engine->SetGzOgreRenderingMode(GORM_SOLID_COLOR); this->materialMap.clear(); this->datablockMap.clear(); @@ -452,7 +452,7 @@ void Ogre2LaserRetroMaterialSwitcher::passPosExecute( this->datablockMap.clear(); // Remove the custom parameter. Why? If there are multiple cameras that - // use IORM_SOLID_COLOR (or any other mode), we want them to throw if + // use GORM_SOLID_COLOR (or any other mode), we want them to throw if // that code forgot to call setCustomParameter. We may miss those errors // if that code forgets to call but it was already carrying the value // we set here. @@ -490,7 +490,7 @@ void Ogre2LaserRetroMaterialSwitcher::passPosExecute( heightmap->Terra()->UnsetSolidColors(); } - engine->SetIgnOgreRenderingMode(IORM_NORMAL); + engine->SetGzOgreRenderingMode(GORM_NORMAL); } ////////////////////////////////////////////////// @@ -1186,7 +1186,7 @@ void Ogre2GpuRays::Setup1stPass() false); // add laser retro material switcher to workspace listener - // so we can switch to use IORM_SOLID_COLOR + // so we can switch to use GORM_SOLID_COLOR this->dataPtr->laserRetroMaterialSwitcher[i].reset( new Ogre2LaserRetroMaterialSwitcher(this->scene)); this->dataPtr->ogreCompositorWorkspace1st[i]->addListener( diff --git a/ogre2/src/Ogre2GzHlmsPbsPrivate.cc b/ogre2/src/Ogre2GzHlmsPbsPrivate.cc index d92036d52..eed9ec6e5 100644 --- a/ogre2/src/Ogre2GzHlmsPbsPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsPbsPrivate.cc @@ -62,12 +62,12 @@ namespace Ogre Hlms *_hlms) { if (!_casterPass && - (this->gzOgreRenderingMode == IORM_SOLID_COLOR || - this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode == GORM_SOLID_COLOR || + this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED)) { _hlms->_setProperty("gz_render_solid_color", 1); - if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) + if (this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED) _hlms->_setProperty("gz_render_solid_color_textured", 1); } @@ -146,8 +146,8 @@ namespace Ogre } if (_casterPass || - (this->gzOgreRenderingMode != IORM_SOLID_COLOR && - this->gzOgreRenderingMode != IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode != GORM_SOLID_COLOR && + this->gzOgreRenderingMode != GORM_SOLID_THERMAL_COLOR_TEXTURED)) { return; } @@ -163,8 +163,8 @@ namespace Ogre const uint32 instanceIdx = HlmsPbs::fillBuffersForV1( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || - this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == GORM_SOLID_COLOR || + this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { Vector4 customParam = @@ -177,12 +177,12 @@ namespace Ogre dataPtr[1] = customParam.y; dataPtr[2] = customParam.z; - if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED && _queuedRenderable.renderable->hasCustomParameter(2u)) { GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " - "IORM_SOLID_THERMAL_COLOR_TEXTURED"); + "GORM_SOLID_THERMAL_COLOR_TEXTURED"); // Negate customParam.w to tell the shader we wish to multiply // against the diffuse texture. We substract 0.5f to avoid -0.0 = 0.0 @@ -205,8 +205,8 @@ namespace Ogre const uint32 instanceIdx = HlmsPbs::fillBuffersForV2( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || - this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == GORM_SOLID_COLOR || + this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { Vector4 customParam; @@ -236,12 +236,12 @@ namespace Ogre dataPtr[2] = customParam.z; dataPtr[3] = customParam.w; - if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED && _queuedRenderable.renderable->hasCustomParameter(2u)) { GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " - "IORM_SOLID_THERMAL_COLOR_TEXTURED"); + "GORM_SOLID_THERMAL_COLOR_TEXTURED"); // Negate customParam.w to tell the shader we wish to multiply // against the diffuse texture. We substract 0.5f to avoid -0.0 = 0.0 diff --git a/ogre2/src/Ogre2GzHlmsPbsPrivate.hh b/ogre2/src/Ogre2GzHlmsPbsPrivate.hh index c3e07e14b..c43134d46 100644 --- a/ogre2/src/Ogre2GzHlmsPbsPrivate.hh +++ b/ogre2/src/Ogre2GzHlmsPbsPrivate.hh @@ -132,7 +132,7 @@ namespace Ogre public: virtual void notifyPropertiesMergedPreGenerationStep() override; /// \brief Override HlmsListener::hlmsTypeChanged so we can - /// bind buffers which carry per-object data when in IORM_SOLID_COLOR + /// bind buffers which carry per-object data when in GORM_SOLID_COLOR /// \param[in] _casterPass true if this is a caster pass /// \param[in] _commandBuffer command buffer so we can add commands /// \param[in] _datablock material of the object that caused diff --git a/ogre2/src/Ogre2GzHlmsSharedPrivate.hh b/ogre2/src/Ogre2GzHlmsSharedPrivate.hh index 85acd386f..0a9a987f2 100644 --- a/ogre2/src/Ogre2GzHlmsSharedPrivate.hh +++ b/ogre2/src/Ogre2GzHlmsSharedPrivate.hh @@ -38,7 +38,7 @@ namespace gz { inline namespace GZ_RENDERING_VERSION_NAMESPACE { - typedef gz::rendering::IgnOgreRenderingMode IgnOgreRenderingMode; + typedef gz::rendering::GzOgreRenderingMode GzOgreRenderingMode; typedef Ogre::vector::type ConstBufferPackedVec; /// \brief Implements code shared across all or most of our Hlms @@ -106,9 +106,9 @@ namespace gz /// \internal protected: float *currPerObjectDataPtr = nullptr; - /// \brief See IgnOgreRenderingMode. Public variable. + /// \brief See GzOgreRenderingMode. Public variable. /// Modifying it takes change on the next render - public: IgnOgreRenderingMode gzOgreRenderingMode = IORM_NORMAL; + public: GzOgreRenderingMode gzOgreRenderingMode = GORM_NORMAL; }; } } diff --git a/ogre2/src/Ogre2GzHlmsTerraPrivate.cc b/ogre2/src/Ogre2GzHlmsTerraPrivate.cc index 607e40183..a102316d3 100644 --- a/ogre2/src/Ogre2GzHlmsTerraPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsTerraPrivate.cc @@ -59,12 +59,12 @@ namespace Ogre bool _dualParaboloid, SceneManager *_sceneManager, Hlms *_hlms) { if (!_casterPass && - (this->gzOgreRenderingMode == IORM_SOLID_COLOR || - this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode == GORM_SOLID_COLOR || + this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED)) { _hlms->_setProperty("gz_render_solid_color", 1); - if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) + if (this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED) _hlms->_setProperty("gz_render_solid_color_textured", 1); } @@ -143,8 +143,8 @@ namespace Ogre } if (_casterPass || - (this->gzOgreRenderingMode != IORM_SOLID_COLOR && - this->gzOgreRenderingMode != IORM_SOLID_THERMAL_COLOR_TEXTURED)) + (this->gzOgreRenderingMode != GORM_SOLID_COLOR && + this->gzOgreRenderingMode != GORM_SOLID_THERMAL_COLOR_TEXTURED)) { return; } @@ -160,8 +160,8 @@ namespace Ogre const uint32 instanceIdx = HlmsTerra::fillBuffersForV1( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || - this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == GORM_SOLID_COLOR || + this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { const Ogre::Terra *terra = @@ -193,12 +193,12 @@ namespace Ogre dataPtr[1] = customParam.y; dataPtr[2] = customParam.z; - if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED && terra->HasSolidColor(2u)) { GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " - "IORM_SOLID_THERMAL_COLOR_TEXTURED"); + "GORM_SOLID_THERMAL_COLOR_TEXTURED"); // Negate customParam.w to tell the shader we wish to multiply // against the diffuse texture. We substract 0.5f to avoid -0.0 = 0.0 @@ -221,8 +221,8 @@ namespace Ogre const uint32 instanceIdx = HlmsTerra::fillBuffersForV2( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if ((this->gzOgreRenderingMode == IORM_SOLID_COLOR || - this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED) && + if ((this->gzOgreRenderingMode == GORM_SOLID_COLOR || + this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED) && !_casterPass) { const Ogre::Terra *terra = @@ -255,12 +255,12 @@ namespace Ogre dataPtr[2] = customParam.z; dataPtr[3] = customParam.w; - if (this->gzOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && + if (this->gzOgreRenderingMode == GORM_SOLID_THERMAL_COLOR_TEXTURED && terra->HasSolidColor(2u)) { GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " - "IORM_SOLID_THERMAL_COLOR_TEXTURED"); + "GORM_SOLID_THERMAL_COLOR_TEXTURED"); // Negate customParam.w to tell the shader we wish to multiply // against the diffuse texture. We substract 0.5f to avoid -0.0 = 0.0 diff --git a/ogre2/src/Ogre2GzHlmsTerraPrivate.hh b/ogre2/src/Ogre2GzHlmsTerraPrivate.hh index a0abadd57..513fc56eb 100644 --- a/ogre2/src/Ogre2GzHlmsTerraPrivate.hh +++ b/ogre2/src/Ogre2GzHlmsTerraPrivate.hh @@ -129,7 +129,7 @@ namespace Ogre public: virtual void notifyPropertiesMergedPreGenerationStep() override; /// \brief Override HlmsListener::hlmsTypeChanged so we can - /// bind buffers which carry per-object data when in IORM_SOLID_COLOR + /// bind buffers which carry per-object data when in GORM_SOLID_COLOR /// \param[in] _casterPass true if this is a caster pass /// \param[in] _commandBuffer command buffer so we can add commands /// \param[in] _datablock material of the object that caused diff --git a/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc b/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc index d0bc6338f..af56d6a8a 100644 --- a/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsUnlitPrivate.cc @@ -56,7 +56,7 @@ namespace Ogre const CompositorShadowNode *_shadowNode, bool _casterPass, bool _dualParaboloid, SceneManager *_sceneManager, Hlms *_hlms) { - if (!_casterPass && this->gzOgreRenderingMode == IORM_SOLID_COLOR) + if (!_casterPass && this->gzOgreRenderingMode == GORM_SOLID_COLOR) { _hlms->_setProperty("gz_render_solid_color", 1); } @@ -135,7 +135,7 @@ namespace Ogre listener->hlmsTypeChanged(_casterPass, _commandBuffer, _datablock); } - if (_casterPass || this->gzOgreRenderingMode != IORM_SOLID_COLOR) + if (_casterPass || this->gzOgreRenderingMode != GORM_SOLID_COLOR) { return; } @@ -151,7 +151,7 @@ namespace Ogre const uint32 instanceIdx = HlmsUnlit::fillBuffersForV1( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if (this->gzOgreRenderingMode == IORM_SOLID_COLOR && !_casterPass) + if (this->gzOgreRenderingMode == GORM_SOLID_COLOR && !_casterPass) { Vector4 customParam; try @@ -192,7 +192,7 @@ namespace Ogre const uint32 instanceIdx = HlmsUnlit::fillBuffersForV2( _cache, _queuedRenderable, _casterPass, _lastCacheHash, _commandBuffer); - if (this->gzOgreRenderingMode == IORM_SOLID_COLOR && !_casterPass) + if (this->gzOgreRenderingMode == GORM_SOLID_COLOR && !_casterPass) { Vector4 customParam = _queuedRenderable.renderable->getCustomParameter(1u); diff --git a/ogre2/src/Ogre2GzHlmsUnlitPrivate.hh b/ogre2/src/Ogre2GzHlmsUnlitPrivate.hh index 62de717c9..570dedf6e 100644 --- a/ogre2/src/Ogre2GzHlmsUnlitPrivate.hh +++ b/ogre2/src/Ogre2GzHlmsUnlitPrivate.hh @@ -129,7 +129,7 @@ namespace Ogre public: virtual void notifyPropertiesMergedPreGenerationStep() override; /// \brief Override HlmsListener::hlmsTypeChanged so we can - /// bind buffers which carry per-object data when in IORM_SOLID_COLOR + /// bind buffers which carry per-object data when in GORM_SOLID_COLOR /// \param[in] _casterPass true if this is a caster pass /// \param[in] _commandBuffer command buffer so we can add commands /// \param[in] _datablock material of the object that caused diff --git a/ogre2/src/Ogre2MaterialSwitcher.cc b/ogre2/src/Ogre2MaterialSwitcher.cc index 242421227..13900f9fb 100644 --- a/ogre2/src/Ogre2MaterialSwitcher.cc +++ b/ogre2/src/Ogre2MaterialSwitcher.cc @@ -59,7 +59,7 @@ void Ogre2MaterialSwitcher::cameraPreRenderScene( Ogre::Camera * /*_evt*/) { auto engine = Ogre2RenderEngine::Instance(); - engine->SetIgnOgreRenderingMode(IORM_SOLID_COLOR); + engine->SetGzOgreRenderingMode(GORM_SOLID_COLOR); this->materialMap.clear(); this->datablockMap.clear(); @@ -196,7 +196,7 @@ void Ogre2MaterialSwitcher::cameraPostRenderScene( this->datablockMap.clear(); // Remove the custom parameter. Why? If there are multiple cameras that - // use IORM_SOLID_COLOR (or any other mode), we want them to throw if + // use GORM_SOLID_COLOR (or any other mode), we want them to throw if // that code forgot to call setCustomParameter. We may miss those errors // if that code forgets to call but it was already carrying the value // we set here. @@ -234,7 +234,7 @@ void Ogre2MaterialSwitcher::cameraPostRenderScene( heightmap->Terra()->UnsetSolidColors(); } - engine->SetIgnOgreRenderingMode(IORM_NORMAL); + engine->SetGzOgreRenderingMode(GORM_NORMAL); } ///////////////////////////////////////////////// diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index 1184010c3..c32a70062 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -1082,8 +1082,8 @@ Ogre::v1::OverlaySystem *Ogre2RenderEngine::OverlaySystem() const } ///////////////////////////////////////////////// -void Ogre2RenderEngine::SetIgnOgreRenderingMode( - IgnOgreRenderingMode renderingMode) +void Ogre2RenderEngine::SetGzOgreRenderingMode( + GzOgreRenderingMode renderingMode) { this->dataPtr->gzHlmsPbs->gzOgreRenderingMode = renderingMode; this->dataPtr->gzHlmsUnlit->gzOgreRenderingMode = renderingMode; diff --git a/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc b/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc index 6fdaeb3b2..3b064e759 100644 --- a/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc +++ b/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc @@ -232,7 +232,7 @@ void Ogre2SegmentationMaterialSwitcher::cameraPreRenderScene( Ogre::ItemFactory::FACTORY_TYPE_NAME); auto engine = Ogre2RenderEngine::Instance(); - engine->SetIgnOgreRenderingMode(IORM_SOLID_COLOR); + engine->SetGzOgreRenderingMode(GORM_SOLID_COLOR); // Used for multi-link models, where each model has many ogre items but // belongs to the same object, and all of them has the same parent name @@ -403,7 +403,7 @@ void Ogre2SegmentationMaterialSwitcher::cameraPostRenderScene( this->datablockMap.clear(); // Remove the custom parameter. Why? If there are multiple cameras that - // use IORM_SOLID_COLOR (or any other mode), we want them to throw if + // use GORM_SOLID_COLOR (or any other mode), we want them to throw if // that code forgot to call setCustomParameter. We may miss those errors // if that code forgets to call but it was already carrying the value // we set here. @@ -441,7 +441,7 @@ void Ogre2SegmentationMaterialSwitcher::cameraPostRenderScene( heightmap->Terra()->UnsetSolidColors(); } - engine->SetIgnOgreRenderingMode(IORM_NORMAL); + engine->SetGzOgreRenderingMode(GORM_NORMAL); } //////////////////////////////////////////////// diff --git a/ogre2/src/Ogre2ThermalCamera.cc b/ogre2/src/Ogre2ThermalCamera.cc index 17e3bfdab..7e3073d60 100644 --- a/ogre2/src/Ogre2ThermalCamera.cc +++ b/ogre2/src/Ogre2ThermalCamera.cc @@ -241,7 +241,7 @@ void Ogre2ThermalCameraMaterialSwitcher::cameraPreRenderScene( Ogre::Camera * /*_cam*/) { auto engine = Ogre2RenderEngine::Instance(); - engine->SetIgnOgreRenderingMode(IORM_SOLID_THERMAL_COLOR_TEXTURED); + engine->SetGzOgreRenderingMode(GORM_SOLID_THERMAL_COLOR_TEXTURED); // swap item to use v1 shader material // Note: keep an eye out for performance impact on switching materials @@ -653,7 +653,7 @@ void Ogre2ThermalCameraMaterialSwitcher::cameraPostRenderScene( this->datablockMap.clear(); // Remove the custom parameter. Why? If there are multiple cameras that - // use IORM_SOLID_COLOR (or any other mode), we want them to throw if + // use GORM_SOLID_COLOR (or any other mode), we want them to throw if // that code forgot to call setCustomParameter. We may miss those errors // if that code forgets to call but it was already carrying the value // we set here. @@ -699,7 +699,7 @@ void Ogre2ThermalCameraMaterialSwitcher::cameraPostRenderScene( subItem->setDatablock(it.second); } - engine->SetIgnOgreRenderingMode(IORM_NORMAL); + engine->SetGzOgreRenderingMode(GORM_NORMAL); } ////////////////////////////////////////////////// diff --git a/ogre2/src/terrain/Terra/CMakeLists.txt b/ogre2/src/terrain/Terra/CMakeLists.txt index cfb7ad520..c4686fadf 100644 --- a/ogre2/src/terrain/Terra/CMakeLists.txt +++ b/ogre2/src/terrain/Terra/CMakeLists.txt @@ -38,4 +38,4 @@ target_include_directories(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/include ) -target_link_libraries(${PROJECT_NAME} PRIVATE IgnOGRE2::IgnOGRE2) +target_link_libraries(${PROJECT_NAME} PRIVATE GzOGRE2::GzOGRE2) diff --git a/ogre2/src/terrain/Terra/include/Terra/Terra.h b/ogre2/src/terrain/Terra/include/Terra/Terra.h index 5680cccb3..4b1c01022 100644 --- a/ogre2/src/terrain/Terra/include/Terra/Terra.h +++ b/ogre2/src/terrain/Terra/include/Terra/Terra.h @@ -108,9 +108,9 @@ namespace Ogre Camera const *m_camera; // GZ CUSTOMIZE BEGIN - /// See IORM_SOLID_COLOR and IORM_SOLID_THERMAL_COLOR_TEXTURED + /// See GORM_SOLID_COLOR and GORM_SOLID_THERMAL_COLOR_TEXTURED Vector4 mSolidColor[2]; - /// See IORM_SOLID_COLOR and IORM_SOLID_THERMAL_COLOR_TEXTURED + /// See GORM_SOLID_COLOR and GORM_SOLID_THERMAL_COLOR_TEXTURED bool mSolidColorSet[2]; // GZ CUSTOMIZE END @@ -178,7 +178,7 @@ namespace Ogre float getCustomSkirtMinHeight( void ) const { return m_skirtSize; } // GZ CUSTOMIZE BEGIN - /// \brief See IORM_SOLID_COLOR and IORM_SOLID_THERMAL_COLOR_TEXTURED + /// \brief See GORM_SOLID_COLOR and GORM_SOLID_THERMAL_COLOR_TEXTURED /// Replaces renderable->setCustomRenderable(...) because /// a Terrain may have many renderables but the color is the same /// for all of them @@ -186,19 +186,19 @@ namespace Ogre /// \param[in] _idx _solidColor color to apply void SetSolidColor(size_t _idx, const Vector4 _solidColor); - /// \brief See IORM_SOLID_COLOR and IORM_SOLID_THERMAL_COLOR_TEXTURED + /// \brief See GORM_SOLID_COLOR and GORM_SOLID_THERMAL_COLOR_TEXTURED /// Retrieves the value set with SetSolidColor. Throws if unset. /// \param[in] _idx must in range [1; 2] /// \return Color value Vector4 SolidColor(size_t _idx) const; - /// \brief See IORM_SOLID_COLOR and IORM_SOLID_THERMAL_COLOR_TEXTURED + /// \brief See GORM_SOLID_COLOR and GORM_SOLID_THERMAL_COLOR_TEXTURED /// Checks whether a color has been set /// \param[in] _idx must in range [1; 2] /// \return True if color has been unset bool HasSolidColor(size_t _idx) const; - /// \brief See IORM_SOLID_COLOR and IORM_SOLID_THERMAL_COLOR_TEXTURED + /// \brief See GORM_SOLID_COLOR and GORM_SOLID_THERMAL_COLOR_TEXTURED /// Marks all SetSolidColor as unset so that SolidColor throws /// if used again without setting. void UnsetSolidColors(); From 91f00c749ebfdcbd5e54306d1a0af178e364b7ea Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 20 Jul 2022 15:46:10 -0700 Subject: [PATCH 3/5] Conditionally deprecate windows Signed-off-by: methylDragon --- .../include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh index 9bc514861..49082fe76 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh @@ -54,7 +54,11 @@ namespace gz GORM_COUNT = 3, IORM_COUNT = 3, // TODO(CH3): Deprecated. Remove on tock. }; - using IgnOgreRenderingMode GZ_DEPRECATED(7) = GzOgreRenderingMode; // TODO(CH3): Deprecated. Remove on tock. + #ifdef _WIN32 + using IgnOgreRenderingMode = GzOgreRenderingMode; // TODO(CH3): Deprecated. Remove on tock. + #else + using IgnOgreRenderingMode GZ_DEPRECATED(7) = GzOgreRenderingMode; // TODO(CH3): Deprecated. Remove on tock. + #endif } // namespace GZ_RENDERING_VERSION_NAMESPACE } // namespace rendering } // namespace gz From 0201fc44a893cc2927ae6d223d8f5dee42345178 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 21 Jul 2022 14:35:37 -0700 Subject: [PATCH 4/5] Move comment for codecheck Signed-off-by: Louise Poubel --- ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh index 49082fe76..df9ed9e2b 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh @@ -54,10 +54,11 @@ namespace gz GORM_COUNT = 3, IORM_COUNT = 3, // TODO(CH3): Deprecated. Remove on tock. }; + // TODO(CH3): Deprecated. Remove on tock. #ifdef _WIN32 - using IgnOgreRenderingMode = GzOgreRenderingMode; // TODO(CH3): Deprecated. Remove on tock. + using IgnOgreRenderingMode = GzOgreRenderingMode; #else - using IgnOgreRenderingMode GZ_DEPRECATED(7) = GzOgreRenderingMode; // TODO(CH3): Deprecated. Remove on tock. + using IgnOgreRenderingMode GZ_DEPRECATED(7) = GzOgreRenderingMode; #endif } // namespace GZ_RENDERING_VERSION_NAMESPACE } // namespace rendering From 71afb7c31f1e6e7f3eec58224660b9ec748753d1 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 21 Jul 2022 15:40:01 -0700 Subject: [PATCH 5/5] Fix linting errors Signed-off-by: methylDragon --- ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh | 5 +++-- ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh index df9ed9e2b..f6a1b0cf3 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh @@ -48,7 +48,8 @@ namespace gz /// /// Used by thermal camera GORM_SOLID_THERMAL_COLOR_TEXTURED = 2, - IORM_SOLID_THERMAL_COLOR_TEXTURED = 2, // TODO(CH3): Deprecated. Remove on tock. + // TODO(CH3): Deprecated. Remove on tock. + IORM_SOLID_THERMAL_COLOR_TEXTURED = 2, /// \brief Total number of rendering modes GORM_COUNT = 3, @@ -56,7 +57,7 @@ namespace gz }; // TODO(CH3): Deprecated. Remove on tock. #ifdef _WIN32 - using IgnOgreRenderingMode = GzOgreRenderingMode; + using IgnOgreRenderingMode = GzOgreRenderingMode; #else using IgnOgreRenderingMode GZ_DEPRECATED(7) = GzOgreRenderingMode; #endif diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh b/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh index 5dd30eb38..f7453af04 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh @@ -199,7 +199,9 @@ namespace gz public: void SetGzOgreRenderingMode(GzOgreRenderingMode renderingMode); // TODO(CH3): Deprecated. Remove on tock. public: - inline void GZ_DEPRECATED(7) SetIgnOgreRenderingMode(GzOgreRenderingMode renderingMode){ + inline void GZ_DEPRECATED(7) SetIgnOgreRenderingMode( + GzOgreRenderingMode renderingMode) + { return SetGzOgreRenderingMode(renderingMode); }