If input material name is same as current mMaterialName, method should return immediately - getByName method is not very fast for runtime.
I am changing materials on entities per frame and this method slow donw my performance due to this call. I suppose that testing should be part of this method.
SubEntity::setMaterialName enhancement
- bishopnator
- Gnome
- Posts: 395
- Joined: Thu Apr 26, 2007 11:43 am
- Location: Slovakia / Switzerland
- x 18
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
Re: SubEntity::setMaterialName enhancement
Ok, will add early-outs to all occurrences.
