@@ -48,13 +48,13 @@ using Ogre::TechniqueType;
48
48
// / A custom material generator that lets Gazebo use GLSL shaders
49
49
// / (as opposed to the default Cg shaders provided by Ogre) for rendering
50
50
// / terrain.
51
- class IgnTerrainMatGen : public Ogre ::TerrainMaterialGeneratorA
51
+ class GzTerrainMatGen : public Ogre ::TerrainMaterialGeneratorA
52
52
{
53
53
// / \brief Constructor
54
- public: IgnTerrainMatGen ();
54
+ public: GzTerrainMatGen ();
55
55
56
56
// / \brief Destructor
57
- public: virtual ~IgnTerrainMatGen ();
57
+ public: virtual ~GzTerrainMatGen ();
58
58
59
59
// / \brief Shader model 2 profile target.
60
60
public: class SM2Profile :
@@ -404,7 +404,7 @@ class gz::rendering::OgreHeightmapPrivate
404
404
405
405
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11
406
406
// / \brief Pointer to the terrain material generator.
407
- public: IgnTerrainMatGen *ignMatGen {nullptr };
407
+ public: GzTerrainMatGen *gzMatGen {nullptr };
408
408
#endif
409
409
};
410
410
@@ -1010,11 +1010,11 @@ void OgreHeightmap::CreateMaterial()
1010
1010
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11
1011
1011
// use default material
1012
1012
// RTSS PSSM shadows compatible terrain material
1013
- if (!this ->dataPtr ->ignMatGen )
1014
- this ->dataPtr ->ignMatGen = new IgnTerrainMatGen ();
1013
+ if (!this ->dataPtr ->gzMatGen )
1014
+ this ->dataPtr ->gzMatGen = new GzTerrainMatGen ();
1015
1015
1016
1016
auto ptr = Ogre::TerrainMaterialGeneratorPtr ();
1017
- ptr.bind (this ->dataPtr ->ignMatGen );
1017
+ ptr.bind (this ->dataPtr ->gzMatGen );
1018
1018
1019
1019
this ->dataPtr ->terrainGlobals ->setDefaultMaterialGenerator (ptr);
1020
1020
#else
@@ -1040,7 +1040,7 @@ void OgreHeightmap::SetupShadows(bool _enableShadows)
1040
1040
// Assume we get a shader model 2 material profile
1041
1041
Ogre::TerrainMaterialGeneratorA::SM2Profile *matProfile;
1042
1042
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11
1043
- matProfile = static_cast <IgnTerrainMatGen ::SM2Profile *>(
1043
+ matProfile = static_cast <GzTerrainMatGen ::SM2Profile *>(
1044
1044
matGen->getActiveProfile ());
1045
1045
#else
1046
1046
matProfile = static_cast <Ogre::TerrainMaterialGeneratorA::SM2Profile *>(
@@ -1157,14 +1157,14 @@ MaterialPtr OgreHeightmap::Material() const
1157
1157
1158
1158
// ///////////////////////////////////////////////
1159
1159
// ///////////////////////////////////////////////
1160
- // IgnTerrainMatGen
1160
+ // GzTerrainMatGen
1161
1161
// ///////////////////////////////////////////////
1162
1162
// ///////////////////////////////////////////////
1163
1163
1164
1164
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11
1165
1165
1166
1166
// ///////////////////////////////////////////////
1167
- IgnTerrainMatGen::IgnTerrainMatGen ()
1167
+ GzTerrainMatGen::GzTerrainMatGen ()
1168
1168
: TerrainMaterialGeneratorA()
1169
1169
{
1170
1170
// / \TODO(anyone) - This will have to be changed if TerrainMaterialGeneratorA
@@ -1183,12 +1183,12 @@ IgnTerrainMatGen::IgnTerrainMatGen()
1183
1183
}
1184
1184
1185
1185
// ///////////////////////////////////////////////
1186
- IgnTerrainMatGen ::~IgnTerrainMatGen ()
1186
+ GzTerrainMatGen ::~GzTerrainMatGen ()
1187
1187
{
1188
1188
}
1189
1189
1190
1190
// ///////////////////////////////////////////////
1191
- IgnTerrainMatGen ::SM2Profile::SM2Profile (
1191
+ GzTerrainMatGen ::SM2Profile::SM2Profile (
1192
1192
Ogre::TerrainMaterialGenerator *_parent, const Ogre::String &_name,
1193
1193
const Ogre::String &_desc)
1194
1194
: TerrainMaterialGeneratorA::SM2Profile(_parent, _name, _desc)
@@ -1197,15 +1197,15 @@ IgnTerrainMatGen::SM2Profile::SM2Profile(
1197
1197
}
1198
1198
1199
1199
// ///////////////////////////////////////////////
1200
- IgnTerrainMatGen ::SM2Profile::~SM2Profile ()
1200
+ GzTerrainMatGen ::SM2Profile::~SM2Profile ()
1201
1201
{
1202
1202
// Because the base SM2Profile has no virtual destructor:
1203
1203
delete this ->mShaderGen ;
1204
1204
this ->mShaderGen = nullptr ;
1205
1205
}
1206
1206
1207
1207
// ///////////////////////////////////////////////
1208
- void IgnTerrainMatGen ::SM2Profile::addTechnique (
1208
+ void GzTerrainMatGen ::SM2Profile::addTechnique (
1209
1209
const Ogre::MaterialPtr &_mat, const Ogre::Terrain *_terrain,
1210
1210
TechniqueType _tt)
1211
1211
{
@@ -1221,7 +1221,7 @@ void IgnTerrainMatGen::SM2Profile::addTechnique(
1221
1221
if (hmgr.isLanguageSupported (" glsl" ))
1222
1222
{
1223
1223
this ->mShaderGen = OGRE_NEW
1224
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL ();
1224
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL ();
1225
1225
}
1226
1226
else
1227
1227
{
@@ -1250,14 +1250,14 @@ void IgnTerrainMatGen::SM2Profile::addTechnique(
1250
1250
1251
1251
// Doesn't delegate to the proper method otherwise
1252
1252
Ogre::HighLevelGpuProgramPtr vprog =
1253
- ((IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL*)this ->mShaderGen )
1253
+ ((GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL*)this ->mShaderGen )
1254
1254
->generateVertexProgram (this , _terrain, _tt);
1255
1255
1256
1256
// DEBUG: std::cout << "VertShader[" << vprog->getName() << "]:\n"
1257
1257
// << vprog->getSource() << "\n\n";
1258
1258
1259
1259
Ogre::HighLevelGpuProgramPtr fprog =
1260
- ((IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL*)this ->mShaderGen )
1260
+ ((GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL*)this ->mShaderGen )
1261
1261
->generateFragmentProgram (this , _terrain, _tt);
1262
1262
1263
1263
// DEBUG: std::cout << "FragShader[" << fprog->getName() << "]:\n"
@@ -1347,7 +1347,7 @@ void IgnTerrainMatGen::SM2Profile::addTechnique(
1347
1347
// generate() and generateForCompositeMap() are identical to
1348
1348
// TerrainMaterialGeneratorA implementation, the only reason for repeating
1349
1349
// them is that, unfortunately, addTechnique() is not declared virtual.
1350
- Ogre::MaterialPtr IgnTerrainMatGen ::SM2Profile::generate (
1350
+ Ogre::MaterialPtr GzTerrainMatGen ::SM2Profile::generate (
1351
1351
const Ogre::Terrain *_terrain)
1352
1352
{
1353
1353
// re-use old material if exists
@@ -1408,7 +1408,7 @@ Ogre::MaterialPtr IgnTerrainMatGen::SM2Profile::generate(
1408
1408
}
1409
1409
1410
1410
// ///////////////////////////////////////////////
1411
- Ogre::MaterialPtr IgnTerrainMatGen ::SM2Profile::generateForCompositeMap (
1411
+ Ogre::MaterialPtr GzTerrainMatGen ::SM2Profile::generateForCompositeMap (
1412
1412
const Ogre::Terrain *_terrain)
1413
1413
{
1414
1414
// re-use old material if exists
@@ -1442,19 +1442,19 @@ Ogre::MaterialPtr IgnTerrainMatGen::SM2Profile::generateForCompositeMap(
1442
1442
}
1443
1443
1444
1444
// ///////////////////////////////////////////////
1445
- void IgnTerrainMatGen ::SM2Profile::UpdateParams (const Ogre::MaterialPtr &_mat,
1445
+ void GzTerrainMatGen ::SM2Profile::UpdateParams (const Ogre::MaterialPtr &_mat,
1446
1446
const Ogre::Terrain *_terrain)
1447
1447
{
1448
- static_cast <IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL*>(
1448
+ static_cast <GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL*>(
1449
1449
this ->mShaderGen )->updateParams (this , _mat, _terrain, false );
1450
1450
}
1451
1451
1452
1452
// ///////////////////////////////////////////////
1453
- void IgnTerrainMatGen ::SM2Profile::UpdateParamsForCompositeMap (
1453
+ void GzTerrainMatGen ::SM2Profile::UpdateParamsForCompositeMap (
1454
1454
const Ogre::MaterialPtr &_mat, const Ogre::Terrain *_terrain)
1455
1455
{
1456
1456
// Only tested for Ogre 1.11 & 1.12
1457
- static_cast <IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL*>(
1457
+ static_cast <GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL*>(
1458
1458
this ->mShaderGen )->updateParams (this , _mat, _terrain, true );
1459
1459
}
1460
1460
@@ -1466,7 +1466,7 @@ void IgnTerrainMatGen::SM2Profile::UpdateParamsForCompositeMap(
1466
1466
1467
1467
// ///////////////////////////////////////////////
1468
1468
Ogre::HighLevelGpuProgramPtr
1469
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVertexProgram (
1469
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVertexProgram (
1470
1470
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
1471
1471
TechniqueType _tt)
1472
1472
{
@@ -1485,7 +1485,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVertexProgram(
1485
1485
1486
1486
// ///////////////////////////////////////////////
1487
1487
Ogre::HighLevelGpuProgramPtr
1488
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFragmentProgram (
1488
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFragmentProgram (
1489
1489
const SM2Profile *_prof, const Ogre::Terrain *_terrain, TechniqueType _tt)
1490
1490
{
1491
1491
Ogre::HighLevelGpuProgramPtr ret = this ->createFragmentProgram (_prof,
@@ -1563,7 +1563,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgram(
1563
1563
}
1564
1564
1565
1565
// ///////////////////////////////////////////////
1566
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::updateParams (
1566
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::updateParams (
1567
1567
const SM2Profile *_prof, const Ogre::MaterialPtr &_mat,
1568
1568
const Ogre::Terrain *_terrain, bool _compositeMap)
1569
1569
{
@@ -1597,7 +1597,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateParams(
1597
1597
}
1598
1598
1599
1599
// ///////////////////////////////////////////////
1600
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::
1600
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::
1601
1601
generateVertexProgramSource (const SM2Profile *_prof,
1602
1602
const Ogre::Terrain* _terrain, TechniqueType _tt,
1603
1603
Ogre::StringStream &_outStream)
@@ -1622,7 +1622,7 @@ generateVertexProgramSource(const SM2Profile *_prof,
1622
1622
// TerrainMaterialGeneratorA::SM2Profile::ShaderHelperGLSL::generateVpHeader()
1623
1623
// but is needed because generateVpDynamicShadowsParams() is not declared
1624
1624
// virtual.
1625
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVpHeader (
1625
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVpHeader (
1626
1626
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
1627
1627
TechniqueType _tt, Ogre::StringStream &_outStream)
1628
1628
{
@@ -1815,7 +1815,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpHeader(
1815
1815
// This method is identical to
1816
1816
// TerrainMaterialGeneratorA::SM2Profile::ShaderHelperGLSL::generateVpFooter()
1817
1817
// but is needed because generateVpDynamicShadows() is not declared virtual.
1818
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVpFooter (
1818
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVpFooter (
1819
1819
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
1820
1820
TechniqueType _tt, Ogre::StringStream &_outStream)
1821
1821
{
@@ -1846,7 +1846,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpFooter(
1846
1846
1847
1847
// ///////////////////////////////////////////////
1848
1848
void
1849
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVpDynamicShadows (
1849
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateVpDynamicShadows (
1850
1850
const SM2Profile *_prof, const Ogre::Terrain * /* _terrain*/ ,
1851
1851
TechniqueType /* _tt*/ , Ogre::StringStream &_outStream)
1852
1852
{
@@ -1881,7 +1881,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateVpDynamicShadows(
1881
1881
}
1882
1882
1883
1883
// ///////////////////////////////////////////////
1884
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::defaultVpParams (
1884
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::defaultVpParams (
1885
1885
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
1886
1886
TechniqueType _tt, const Ogre::HighLevelGpuProgramPtr &_prog)
1887
1887
{
@@ -1935,7 +1935,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::defaultVpParams(
1935
1935
}
1936
1936
1937
1937
// ///////////////////////////////////////////////
1938
- unsigned int IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::
1938
+ unsigned int GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::
1939
1939
generateVpDynamicShadowsParams (unsigned int _texCoord, const SM2Profile *_prof,
1940
1940
const Ogre::Terrain * /* _terrain*/ , TechniqueType /* _tt*/ ,
1941
1941
Ogre::StringStream &_outStream)
@@ -1965,7 +1965,7 @@ generateVpDynamicShadowsParams(unsigned int _texCoord, const SM2Profile *_prof,
1965
1965
}
1966
1966
1967
1967
// ///////////////////////////////////////////////
1968
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpHeader (
1968
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpHeader (
1969
1969
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
1970
1970
TechniqueType _tt, Ogre::StringStream &_outStream)
1971
1971
{
@@ -2196,7 +2196,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpHeader(
2196
2196
2197
2197
// ///////////////////////////////////////////////
2198
2198
void
2199
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsParams (
2199
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsParams (
2200
2200
Ogre::uint *_texCoord, Ogre::uint *_sampler, const SM2Profile *_prof,
2201
2201
const Ogre::Terrain * /* _terrain*/ , TechniqueType _tt,
2202
2202
Ogre::StringStream &_outStream)
@@ -2232,7 +2232,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsParams(
2232
2232
}
2233
2233
2234
2234
// ///////////////////////////////////////////////
2235
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpLayer (
2235
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpLayer (
2236
2236
const SM2Profile *_prof, const Ogre::Terrain * /* _terrain*/ ,
2237
2237
TechniqueType _tt, Ogre::uint _layer,
2238
2238
Ogre::StringStream &_outStream)
@@ -2311,7 +2311,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpLayer(
2311
2311
}
2312
2312
2313
2313
// ///////////////////////////////////////////////
2314
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpFooter (
2314
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpFooter (
2315
2315
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
2316
2316
TechniqueType _tt, Ogre::StringStream &_outStream)
2317
2317
{
@@ -2391,7 +2391,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpFooter(
2391
2391
2392
2392
// ///////////////////////////////////////////////
2393
2393
void
2394
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsHelpers (
2394
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsHelpers (
2395
2395
const SM2Profile *_prof, const Ogre::Terrain * /* _terrain*/ ,
2396
2396
TechniqueType /* _tt*/ , Ogre::StringStream &_outStream)
2397
2397
{
@@ -2529,7 +2529,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadowsHelpers(
2529
2529
}
2530
2530
2531
2531
// ///////////////////////////////////////////////
2532
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadows (
2532
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadows (
2533
2533
const SM2Profile *_prof, const Ogre::Terrain * /* _terrain*/ ,
2534
2534
TechniqueType /* _tt*/ , Ogre::StringStream &_outStream)
2535
2535
{
@@ -2587,7 +2587,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFpDynamicShadows(
2587
2587
2588
2588
// ///////////////////////////////////////////////
2589
2589
void
2590
- IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFragmentProgramSource (
2590
+ GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::generateFragmentProgramSource (
2591
2591
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
2592
2592
TechniqueType _tt, Ogre::StringStream &_outStream)
2593
2593
{
@@ -2607,7 +2607,7 @@ IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::generateFragmentProgramSource(
2607
2607
}
2608
2608
2609
2609
// ///////////////////////////////////////////////
2610
- void IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::updateVpParams (
2610
+ void GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::updateVpParams (
2611
2611
const SM2Profile *_prof, const Ogre::Terrain *_terrain,
2612
2612
#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 8
2613
2613
TechniqueType _tt,
@@ -2647,7 +2647,7 @@ void IgnTerrainMatGen::SM2Profile::ShaderHelperGLSL::updateVpParams(
2647
2647
}
2648
2648
2649
2649
// ///////////////////////////////////////////////
2650
- Ogre::String IgnTerrainMatGen ::SM2Profile::ShaderHelperGLSL::GetChannel (
2650
+ Ogre::String GzTerrainMatGen ::SM2Profile::ShaderHelperGLSL::GetChannel (
2651
2651
Ogre::uint _idx)
2652
2652
{
2653
2653
Ogre::uint rem = _idx % 4 ;
0 commit comments