setRenderStates3DMode in ES1 and ES2 now use setBlendFunc with (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) instead of (GL_ONE, GL_ONE_MINUS_SRC_COLOR).
This prevents color blending with background when we only want alpha blending (when EBO_ADD is set in materials). It's something that was changed a few years ago in the OpenGL driver, but never made it into the ES drivers. Note that transparency in ES1 _is_ currently broken - but it was broken before this patch already (so another bug to hunt). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5473 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
e1c93e64fb
commit
c3ed02c8d0
|
@ -1684,7 +1684,7 @@ COGLES2Driver::~COGLES2Driver()
|
|||
{
|
||||
// Reset Texture Stages
|
||||
CacheHandler->setBlend(false);
|
||||
CacheHandler->setBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
|
||||
CacheHandler->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
ResetRenderStates = true;
|
||||
}
|
||||
|
|
|
@ -1474,7 +1474,7 @@ void COGLES1Driver::setRenderStates3DMode()
|
|||
// Reset Texture Stages
|
||||
CacheHandler->setBlend(false);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
CacheHandler->setBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
|
||||
CacheHandler->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
// switch back the matrices
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
|
Loading…
Reference in New Issue