diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2005-07-27 13:30:53 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2005-07-27 13:30:53 +0400 |
commit | 411123b2502388c9082886be48db93836ceacea8 (patch) | |
tree | 2d37fe8fc95b71b603a9e2fdf76580768a134313 /source/gameengine/GamePlayer/common | |
parent | b8142515ce762107a186fac501d73a2dbe42047a (diff) |
- added debug line drawing in gameengine (handy for debugging physics problems)
- added #ifdef for a visual studio 8 crashing problems
- added scaling and tolerances to triangle meshes
Diffstat (limited to 'source/gameengine/GamePlayer/common')
-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); } /** |