forked from Mirrorlandia_minetest/irrlicht
Add MaterialType in COpenGLSLMaterialRenderer::OnSetMaterial back in
Shouldn't have been removed with last commit. But adding some comments as it's slightly confusing. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6470 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
c4bbbe1aaf
commit
37d821dcc3
@ -237,10 +237,13 @@ void COpenGLSLMaterialRenderer::OnSetMaterial(const video::SMaterial& material,
|
||||
|
||||
COpenGLCacheHandler* cacheHandler = Driver->getCacheHandler();
|
||||
|
||||
if (Program2)
|
||||
Driver->irrGlUseProgram(Program2);
|
||||
else if (Program)
|
||||
Driver->extGlUseProgramObject(Program);
|
||||
if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) // each program has it's own type
|
||||
{
|
||||
if (Program2)
|
||||
Driver->irrGlUseProgram(Program2);
|
||||
else if (Program)
|
||||
Driver->extGlUseProgramObject(Program);
|
||||
}
|
||||
|
||||
Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user