I noticed that with EMT_TRANSPARENT_ALPHA_CHANNEL_REF the colors in the SMaterial are ignored.
This can be fixed by replacing:
Code: Select all
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
Code: Select all
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);