I had some problems with rendering transparent fonts with opengl driver in irrlicht 1.0:
Code: Select all
font2->draw(L"test",
rect<s32>(0, 0, 200, 200),
SColor(100, 255, 255, 255));
--- 'temporary' solution:
In COpenGLDriver.cpp, in COpenGLDriver::setRenderStates2DMode (~line 1650) comment block of four glTexEnvf and insert an additional one:
Code: Select all
/*
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PRIMARY_COLOR_EXT);
*/
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
---- THE Solution
Just ctrl+c ctrl+v draw2dImage, rename it to draw2DLetter and change the function call in draw method from CGuiFont.cpp (line 318).
That's all. I hope it will be helpful.
iona