Hello,
Most things that inherit from Renderable have a setMaterial/setMaterialName function, but Renderable itself has not.
This gaves me problem when I was working with std::set of Renderable* (subentity, billboards etc...) for which I wanted to change the material once using polymorphism.
I would like to know if it is a good idea to add such virtual function to Renderable.
Best,
Pierre
Renderable setMaterial
- madmarx
- OGRE Expert User
- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 50
Renderable setMaterial
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: Renderable setMaterial
The semantic of Renderable makes it not a good idea to put set Material there as a Renderable could not have any material informations. But for convenience it could still be done.
Maybe an intenrmediate class in the hierarchy would be necessary? Something that is Renderable and can have a Material. But Maybe that's overkill. Not sure.
Maybe an intenrmediate class in the hierarchy would be necessary? Something that is Renderable and can have a Material. But Maybe that's overkill. Not sure.
- madmarx
- OGRE Expert User
- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 50
Re: Renderable setMaterial
I don't see when it could happen? And there is already a getMaterial function, too.as a Renderable could not have any material informations.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0