[fix] OpenGL in dev-cpp EMT_TRANSPARENT_ALPHA_CHANNEL
Posted: Sat Apr 16, 2005 1:40 pm
Hi, for those having problems with EMT_TRANSPARENT_ALPHA_CHANNEL using devcpp OpenGL, I've found:
From COpenGLMaterialRenderer.h
in class
COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL
change:
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
for:
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
Tried it on my machine (with Ati 9200 card) and did worked like the usual alpha matte instead of like "additive" mode mixed with different transparency. Used to correct:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=4083
Just draw semitransparent objects before solid ones.
Ciao.
From COpenGLMaterialRenderer.h
in class
COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL
change:
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
for:
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
Tried it on my machine (with Ati 9200 card) and did worked like the usual alpha matte instead of like "additive" mode mixed with different transparency. Used to correct:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=4083
Just draw semitransparent objects before solid ones.
Ciao.