Skip to content

Commit

Permalink
revert some changes
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Sep 16, 2023
1 parent fbb6bbc commit 9544797
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
47 changes: 0 additions & 47 deletions examples/projector/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include <gz/common/Console.hh>
#include <gz/rendering.hh>

#include <gz/common/geospatial/ImageHeightmap.hh>

#include "example_config.hh"
#include "GlutWindow.hh"

Expand Down Expand Up @@ -144,51 +142,6 @@ void buildScene(ScenePtr _scene)
camera->SetVisibilityMask(0x01);

root->AddChild(camera);

auto data = std::make_shared<common::ImageHeightmap>();
data->Load(common::joinPaths(RESOURCE_PATH, "heightmap_bowl.png"));

HeightmapDescriptor desc;
desc.SetName("example_bowl");
desc.SetData(data);
desc.SetSize({17, 17, 10});
desc.SetSampling(2u);
desc.SetUseTerrainPaging(false);

HeightmapTexture textureA;
textureA.SetSize(1.0);
textureA.SetDiffuse("../media/dirt_diffusespecular.png");
textureA.SetNormal("../media/flat_normal.png");
desc.AddTexture(textureA);

HeightmapBlend blendA;
blendA.SetMinHeight(2.0);
blendA.SetFadeDistance(5.0);
desc.AddBlend(blendA);

HeightmapTexture textureB;
textureB.SetSize(1.0);
textureB.SetDiffuse("../media/grass_diffusespecular.png");
textureB.SetNormal("../media/flat_normal.png");
desc.AddTexture(textureB);

HeightmapBlend blendB;
blendB.SetMinHeight(4.0);
blendB.SetFadeDistance(5.0);
desc.AddBlend(blendB);

HeightmapTexture textureC;
textureC.SetSize(1.0);
textureC.SetDiffuse("../media/fungus_diffusespecular.png");
textureC.SetNormal("../media/flat_normal.png");
desc.SetPosition({-20, 10, 0});
desc.AddTexture(textureC);

auto heightmapGeom = _scene->CreateHeightmap(desc);

auto vis = _scene->CreateVisual();
vis->AddGeometry(heightmapGeom);
root->AddChild(vis);
}

//////////////////////////////////////////////////
Expand Down
3 changes: 0 additions & 3 deletions ogre2/src/Ogre2Heightmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ void Ogre2Heightmap::Init()

Ogre::Hlms *hlmsTerra =
ogreRoot->getHlmsManager()->getHlms(Ogre::HLMS_USER3);
hlmsTerra->setDebugOutputPath(true, false);
// hlmsTerra->_setProperty(Ogre::HlmsBaseProp::EnableDecals, 0);
// hlmsTerra->_setProperty(Ogre::HlmsBaseProp::DecalsDiffuse, 1);

GZ_ASSERT(dynamic_cast<Ogre::HlmsTerra*>(hlmsTerra),
"HlmsTerra incorrectly setup, memory corrupted, or "
Expand Down

0 comments on commit 9544797

Please sign in to comment.