Code: Select all
itsDriver->draw2DImage(itsImage, pos, itsSourceRect, 0, video::SColor(alpha,255,255,255), true);
After playing around with the engine source a bit, and searching through the net I found the original code from zola, and saw a difference in the "setRenderStates2DMode"-function.
zola's original code (only the relevant part):
Code: Select all
if (alphaChannel)
{
glEnable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
Code: Select all
if (alphaChannel)
{
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_TEXTURE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
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);
}
Makes a pretty good workaround obsolete that I already wrote...
Could someone with OpenGL experience please look this through? I doubt that the code was changed without reason, so I fear I may be trading one evil for another.
MedO