Apply fix from r5595 to correct LastMaterial in OpenGLDriver to the OGL ES drivers.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5598 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2017-12-31 20:51:50 +00:00
parent e3d6a907ff
commit 248526d9d5
2 changed files with 4 additions and 0 deletions

View File

@ -1710,6 +1710,7 @@ COGLES2Driver::~COGLES2Driver()
Material, LastMaterial, ResetRenderStates, this);
LastMaterial = Material;
CacheHandler->correctCacheMaterial(LastMaterial);
ResetRenderStates = false;
}
@ -1990,6 +1991,7 @@ COGLES2Driver::~COGLES2Driver()
MaterialRenderer2DActive->OnSetMaterial(Material, LastMaterial, true, 0);
LastMaterial = Material;
CacheHandler->correctCacheMaterial(LastMaterial);
// no alphaChannel without texture
alphaChannel &= texture;

View File

@ -1503,6 +1503,7 @@ void COGLES1Driver::setRenderStates3DMode()
Material, LastMaterial, ResetRenderStates, this);
LastMaterial = Material;
CacheHandler->correctCacheMaterial(LastMaterial);
ResetRenderStates = false;
}
@ -2059,6 +2060,7 @@ void COGLES1Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh
setBasicRenderStates(Material, LastMaterial, false);
LastMaterial = Material;
CacheHandler->correctCacheMaterial(LastMaterial);
// no alphaChannel without texture
alphaChannel &= texture;