diff options
Diffstat (limited to 'source/gameengine/GamePlayer/common/GPC_RenderTools.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_RenderTools.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index 8c3a17f58f3..3d81046e8e9 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -173,6 +173,7 @@ void GPC_RenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode, int lines; char* s = tmpstr.Ptr(); char* p; + // Save and change OpenGL settings int texture2D; @@ -182,6 +183,11 @@ void GPC_RenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode, glGetIntegerv(GL_FOG, (GLint*)&fog); glDisable(GL_FOG); + int light; + glGetIntegerv(GL_LIGHTING, (GLint*)&light); + glDisable(GL_LIGHTING); + + // Set up viewing settings glMatrixMode(GL_PROJECTION); glPushMatrix(); @@ -228,6 +234,10 @@ void GPC_RenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode, glEnable(GL_TEXTURE_2D); else glDisable(GL_TEXTURE_2D); + if (light) + glEnable(GL_LIGHTING); + else + glDisable(GL_LIGHTING); } /** |