Skip to content

Commit

Permalink
remove debugging statements
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Jan 12, 2024
1 parent 00dd53f commit 3e65518
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
45 changes: 0 additions & 45 deletions ogre2/src/Ogre2GpuRays.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <gz/math/Vector3.hh>

#include <gz/common/Console.hh>
#include <gz/common/Timer.hh>
#include <gz/math/Helpers.hh>

#include "gz/rendering/ogre2/Ogre2Camera.hh"
Expand Down Expand Up @@ -231,10 +230,6 @@ Ogre2LaserRetroMaterialSwitcher::Ogre2LaserRetroMaterialSwitcher(
void Ogre2LaserRetroMaterialSwitcher::passPreExecute(
Ogre::CompositorPass *_pass)
{
common::Timer t;
t.Start();


if(_pass->getDefinition()->mIdentifier == kLaserRetro1stPassQuad)
{
GZ_ASSERT(dynamic_cast<Ogre::CompositorPassQuad *>(_pass),
Expand Down Expand Up @@ -490,17 +485,12 @@ void Ogre2LaserRetroMaterialSwitcher::passPreExecute(

// Remove the reference count on noBlend we created
hlmsManager->destroyBlendblock(noBlend);

t.Stop();
// std::cerr << " Ogre2GpuRays passPre " << t.ElapsedTime().count() << std::endl;
}

//////////////////////////////////////////////////
void Ogre2LaserRetroMaterialSwitcher::passPosExecute(
Ogre::CompositorPass *_pass)
{
common::Timer t;
t.Start();
if(_pass->getDefinition()->mIdentifier != kLaserRetroMainDepthPassId)
return;

Expand Down Expand Up @@ -556,10 +546,6 @@ void Ogre2LaserRetroMaterialSwitcher::passPosExecute(
}

engine->SetGzOgreRenderingMode(GORM_NORMAL);

t.Stop();
// std::cerr << " Ogre2GpuRays passPost " << t.ElapsedTime().count() << std::endl;

}

//////////////////////////////////////////////////
Expand Down Expand Up @@ -1218,10 +1204,6 @@ void Ogre2GpuRays::CreateGpuRaysTextures()
/////////////////////////////////////////////////
void Ogre2GpuRays::UpdateRenderTarget1stPass()
{

common::Timer t;
t.Start();

Ogre::vector<Ogre::TextureGpu *>::type swappedTargets;
swappedTargets.reserve(2u);

Expand All @@ -1236,13 +1218,7 @@ void Ogre2GpuRays::UpdateRenderTarget1stPass()

this->dataPtr->ogreCompositorWorkspace1st[i]->_validateFinalTarget();
this->dataPtr->ogreCompositorWorkspace1st[i]->_beginUpdate(false);

common::Timer t2;
t2.Start();
this->dataPtr->ogreCompositorWorkspace1st[i]->_update();
t2.Stop();
// std::cerr << " Ogre2GpuRays 1stPass _update " << t2.ElapsedTime().count() << std::endl;

this->dataPtr->ogreCompositorWorkspace1st[i]->_endUpdate(false);

swappedTargets.clear();
Expand All @@ -1251,18 +1227,11 @@ void Ogre2GpuRays::UpdateRenderTarget1stPass()

this->dataPtr->ogreCompositorWorkspace1st[i]->setEnabled(false);
}

t.Stop();
// std::cerr << " Ogre2GpuRays 1stPass " << t.ElapsedTime().count() << " : " << this->dataPtr->cubeFaceIdx.size() << std::endl;
}

/////////////////////////////////////////////////
void Ogre2GpuRays::UpdateRenderTarget2ndPass()
{
common::Timer t;
t.Start();


this->dataPtr->ogreCompositorWorkspace2nd->_validateFinalTarget();
this->dataPtr->ogreCompositorWorkspace2nd->_beginUpdate(false);
this->dataPtr->ogreCompositorWorkspace2nd->_update();
Expand All @@ -1271,16 +1240,11 @@ void Ogre2GpuRays::UpdateRenderTarget2ndPass()
Ogre::vector<Ogre::TextureGpu *>::type swappedTargets;
swappedTargets.reserve(2u);
this->dataPtr->ogreCompositorWorkspace2nd->_swapFinalTarget(swappedTargets);

t.Stop();
// std::cerr << " Ogre2GpuRays 2ndPass " << t.ElapsedTime().count() << std::endl;
}

//////////////////////////////////////////////////
void Ogre2GpuRays::Render()
{
common::Timer t;
t.Start();
this->scene->StartRendering(this->dataPtr->ogreCamera);

auto engine = Ogre2RenderEngine::Instance();
Expand All @@ -1300,9 +1264,6 @@ void Ogre2GpuRays::Render()
hlmsCustomizations.minDistanceClip = -1;

this->scene->FlushGpuCommandsAndStartNewFrame(6u, false);
t.Stop();
// std::cerr << "============================================= Ogre2GpuRays Render() " << t.ElapsedTime().count() << std::endl;
std::cerr << t.ElapsedTime().count() << std::endl;
}

//////////////////////////////////////////////////
Expand All @@ -1315,9 +1276,6 @@ void Ogre2GpuRays::PreRender()
//////////////////////////////////////////////////
void Ogre2GpuRays::PostRender()
{
common::Timer t;
t.Start();

unsigned int width = this->dataPtr->w2nd;
unsigned int height = this->dataPtr->h2nd;

Expand Down Expand Up @@ -1383,9 +1341,6 @@ void Ogre2GpuRays::PostRender()
this->dataPtr->newGpuRaysFrame(this->dataPtr->gpuRaysScan,
width, height, this->Channels(), "PF_FLOAT32_RGB");

t.Stop();
// std::cerr << "Ogre2GpuRays PostRender() " << t.ElapsedTime().count() << " : " << width << "x" << height << std::endl;

// Uncomment to debug output
// std::cerr << "wxh: " << width << " x " << height << std::endl;
// for (unsigned int i = 0; i < height; ++i)
Expand Down
5 changes: 0 additions & 5 deletions ogre2/src/Ogre2RenderTarget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

#include <gz/common/Console.hh>
#include <gz/common/Timer.hh>

#include "gz/rendering/Material.hh"

Expand Down Expand Up @@ -431,13 +430,9 @@ void Ogre2RenderTarget::Copy(Image &_image) const
}
else
{
common::Timer t;
t.Start();
dstBox.data = _image.Data();
Ogre::Image2::copyContentsToMemory(
texture, texture->getEmptyBox(0u), dstBox, dstOgrePf);
t.Stop();
std::cerr << "Ogre2RenderTarget copyContents " << t.ElapsedTime().count() << std::endl;
}
}

Expand Down

0 comments on commit 3e65518

Please sign in to comment.