Refactor the way you set material properties

Instead	of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
This commit is contained in:
Gregor Parzefall
2023-06-23 11:33:29 +02:00
committed by sfan5
parent b249e4523d
commit 9e0189019e
9 changed files with 48 additions and 243 deletions

View File

@ -690,14 +690,6 @@ void CSkinnedMesh::setBoundingBox( const core::aabbox3df& box)
}
//! sets a flag of all contained materials to a new value
void CSkinnedMesh::setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
{
for (u32 i=0; i<LocalBuffers.size(); ++i)
LocalBuffers[i]->Material.setFlag(flag,newvalue);
}
//! set the hardware mapping hint, for driver
void CSkinnedMesh::setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint,
E_BUFFER_TYPE buffer)

View File

@ -72,9 +72,6 @@ namespace scene
//! set user axis aligned bounding box
void setBoundingBox( const core::aabbox3df& box) override;
//! sets a flag of all contained materials to a new value
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) override;
//! set the hardware mapping hint, for driver
void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override;