Skip to content

Commit

Permalink
update check
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
  • Loading branch information
iche033 committed Dec 9, 2021
1 parent f1d5378 commit 8afca43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ogre2/src/Ogre2DepthCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,9 @@ void Ogre2DepthCamera::Render()
auto engine = Ogre2RenderEngine::Instance();
std::string renderSystemName =
engine->OgreRoot()->getRenderSystem()->getFriendlyName();
bool useGL = renderSystemName.find("OpenGL") != std::string::npos;
#ifndef _WIN32
if (renderSystemName.find("OpenGL") != std::string::npos)
if (useGL)
glEnable(GL_DEPTH_CLAMP);
#endif

Expand All @@ -999,7 +1000,7 @@ void Ogre2DepthCamera::Render()
this->scene->FlushGpuCommandsAndStartNewFrame(1u, false);

#ifndef _WIN32
if (renderSystemName.find("OpenGL") != std::string::npos)
if (useGL)
glDisable(GL_DEPTH_CLAMP);
#endif
}
Expand Down
5 changes: 3 additions & 2 deletions ogre2/src/Ogre2ThermalCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,9 @@ void Ogre2ThermalCamera::Render()
auto engine = Ogre2RenderEngine::Instance();
std::string renderSystemName =
engine->OgreRoot()->getRenderSystem()->getFriendlyName();
bool useGL = renderSystemName.find("OpenGL") != std::string::npos;
#ifndef _WIN32
if (renderSystemName.find("OpenGL") != std::string::npos)
if (useGL)
glEnable(GL_DEPTH_CLAMP);
#endif

Expand All @@ -859,7 +860,7 @@ void Ogre2ThermalCamera::Render()
this->scene->FlushGpuCommandsAndStartNewFrame(1u, false);

#ifndef _WIN32
if (renderSystemName.find("OpenGL") != std::string::npos)
if (useGL)
glDisable(GL_DEPTH_CLAMP);
#endif
}
Expand Down

0 comments on commit 8afca43

Please sign in to comment.