forked from bartvdbraak/blender
font objects in blenderplayer fail when object with alpha is rendered
the embed bge has its own DisableForText() routine which prepares the GL flags for the text render. For some reason blenderplayer is taking a slim approach and going straight for the rendering. This routine helps to address this bug/case (non reported, foundin my own project files). If need arises we should move this to its own routine incorporating the other GL tests the embed bge performs.
This commit is contained in:
parent
001299a0f6
commit
91058355cc
@ -291,6 +291,29 @@ void GPC_RenderTools::RenderText3D( int fontid,
|
||||
double* mat,
|
||||
float aspect)
|
||||
{
|
||||
if(GLEW_ARB_multitexture) {
|
||||
for(int i=0; i<MAXTEX; i++) {
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB+i);
|
||||
|
||||
if(GLEW_ARB_texture_cube_map)
|
||||
if(glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB))
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
|
||||
if(glIsEnabled(GL_TEXTURE_2D))
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
}
|
||||
else {
|
||||
if(GLEW_ARB_texture_cube_map)
|
||||
if(glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB))
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
|
||||
if(glIsEnabled(GL_TEXTURE_2D))
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
/* the actual drawing */
|
||||
glColor4fv(color);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user