mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-24 15:12:24 +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();
|
||||
|
||||
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