Fix: The debug lines of Physics Debug Visualization were drawn incorrectly when using overlay scenes (it was using the wrong camera)

This commit is contained in:
Erwin Coumans
2009-03-09 05:01:16 +00:00
parent abb338ddf9
commit 6e85d00055
7 changed files with 31 additions and 6 deletions

View File

@@ -327,13 +327,12 @@ void RAS_OpenGLRasterizer::ClearCachingInfo(void)
m_materialCachingInfo = 0;
}
void RAS_OpenGLRasterizer::EndFrame()
void RAS_OpenGLRasterizer::FlushDebugLines()
{
//DrawDebugLines
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
//DrawDebugLines
glBegin(GL_LINES);
for (unsigned int i=0;i<m_debugLines.size();i++)
{
@@ -348,8 +347,19 @@ void RAS_OpenGLRasterizer::EndFrame()
}
glEnd();
glEnable(GL_LIGHTING);
glEnable(GL_TEXTURE_2D);
m_debugLines.clear();
}
void RAS_OpenGLRasterizer::EndFrame()
{
FlushDebugLines();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
m_2DCanvas->EndFrame();
}