mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-10 17:53:53 +01:00
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();
|
COpenGLCacheHandler* cacheHandler = Driver->getCacheHandler();
|
||||||
|
|
||||||
|
if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) // each program has it's own type
|
||||||
|
{
|
||||||
if (Program2)
|
if (Program2)
|
||||||
Driver->irrGlUseProgram(Program2);
|
Driver->irrGlUseProgram(Program2);
|
||||||
else if (Program)
|
else if (Program)
|
||||||
Driver->extGlUseProgramObject(Program);
|
Driver->extGlUseProgramObject(Program);
|
||||||
|
}
|
||||||
|
|
||||||
Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
|
Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user