SimpleRenderables setmaterial
Posted: Mon Oct 10, 2011 5:35 am
Unlike entities, you can't call setMaterial on a simple renderable using a MaterialPtr, you have to give a string name. I just found this out when trying to apply a new material to a full screen quad.
Not huge I admit, instead of
I need to go something like
Since I was following the same pattern I was using to set materials on my world geometry and my entities, it would have been a little nicer if I could use a MaterialPtr.
Not huge I admit, instead of
Code: Select all
miniScreen_DfShMaster->setMaterial( m_pProjectorMaterial_Fast[nProjector] ) ;
Code: Select all
miniScreen_DfShMaster->setMaterial( m_pProjectorMaterial_Fast[nProjector].get()->getName() ) ;