diff options
author | Kent Mein <mein@cs.umn.edu> | 2008-04-16 21:40:59 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2008-04-16 21:40:59 +0400 |
commit | 867e12836b746b174743d0500e39343e1adb1b7f (patch) | |
tree | 36f42a00eb4ab505eca0c2d67c26c85ed78a9e7e /source/gameengine/BlenderRoutines/KX_BlenderGL.cpp | |
parent | d482b3285cdbfc85b5031fc7223b8ffe96619562 (diff) |
This patch spawns from this game engine issue:
[#7113] GE crash pressing as soon as P on 64 bit
Note: glext.h has been removed from the source
If you get errors compiling with it you have 2 options
download/install glext.h (preferred method)
or set WITH_BF_GLEXT=false
If your a user and having problems with game engine try
setting the env var: WITHOUT_GLEXT 1
Kent
Diffstat (limited to 'source/gameengine/BlenderRoutines/KX_BlenderGL.cpp')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderGL.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index 413b16bc300..54ceec306e2 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -186,28 +186,30 @@ void BL_RenderText(int mode,const char* textstr,int textlen,struct MTFace* tface void DisableForText() { - if(glIsEnabled(GL_BLEND)) - glDisable(GL_BLEND); + if(glIsEnabled(GL_BLEND)) glDisable(GL_BLEND); if(glIsEnabled(GL_LIGHTING)) { glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); } -#ifdef GL_ARB_multitexture - for(int i=0; i<MAXTEX; i++) { - if(bgl::RAS_EXT_support._ARB_multitexture) - bgl::blActiveTextureARB(GL_TEXTURE0_ARB+i); +#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) + if (!getenv("WITHOUT_GLEXT")) { + for(int i=0; i<MAXTEX; i++) { + if(bgl::RAS_EXT_support._ARB_multitexture) + bgl::blActiveTextureARB(GL_TEXTURE0_ARB+i); #ifdef GL_ARB_texture_cube_map - if(bgl::RAS_EXT_support._ARB_texture_cube_map) - if(glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB)) - glDisable(GL_TEXTURE_CUBE_MAP_ARB); + if(bgl::RAS_EXT_support._ARB_texture_cube_map) + if(glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB)) + glDisable(GL_TEXTURE_CUBE_MAP_ARB); #endif - if(glIsEnabled(GL_TEXTURE_2D)) - glDisable(GL_TEXTURE_2D); + if(glIsEnabled(GL_TEXTURE_2D)) glDisable(GL_TEXTURE_2D); + } + } else { + if(glIsEnabled(GL_TEXTURE_2D)) glDisable(GL_TEXTURE_2D); } + #else//GL_ARB_multitexture - if(glIsEnabled(GL_TEXTURE_2D)) - glDisable(GL_TEXTURE_2D); + if(glIsEnabled(GL_TEXTURE_2D)) glDisable(GL_TEXTURE_2D); #endif } |