bugfix, only use the texture in layer 0 to apply material

This commit is contained in:
Marianne Gagnon 2014-08-02 20:33:30 -04:00
parent a03a6809f7
commit 55e880530a

View File

@ -865,12 +865,8 @@ void IrrDriver::setAllMaterialFlags(scene::IMesh *mesh) const
{
scene::IMeshBuffer *mb = mesh->getMeshBuffer(i);
video::SMaterial &irr_material=mb->getMaterial();
for(unsigned int j=0; j<video::MATERIAL_MAX_TEXTURES; j++)
{
video::ITexture* t=irr_material.getTexture(j);
if(t) material_manager->setAllMaterialFlags(t, mb);
} // for j<MATERIAL_MAX_TEXTURES
video::ITexture* t=irr_material.getTexture(0);
if(t) material_manager->setAllMaterialFlags(t, mb);
material_manager->setAllUntexturedMaterialFlags(mb);
} // for i<getMeshBufferCount()
} // setAllMaterialFlags