Peer-to-Peer Forum

 

Login Register    
light lobe not showing up
Posted: 28 March 2011 02:10 PM  
Newbie
Rank
Total Posts:  20
Joined  2008-12-22

Can projected light lobes be created after configure?

 
Posted: 28 March 2011 04:57 PM   [ # 1 ]  
Sr. Member
RankRankRankRank
Total Posts:  118
Joined  2009-01-16

Unfortunately not. The reason being is that the shader infrastructure needs to know about the projected light lobes in order to properly setup the shader code for rendering. Once the application gets past configure, it is too late to add in those other projected light lobes.

With that being said, there is somewhat of a way around this. You can manually configure a new projected light lobe and then reshaderize all the states that need the projected light lobe.

Something to the extent of this

vpLightlobeProjected *projLL = new vpLightlobeProjected;
projLL->preConfigure();
projLL->configure(); 

plus all the other setup code that you wish to apply to the projected light lobe.
Once you got that, you need to go through all the states on all the items you want your new projected lightlobe to be applied.

vpObject::iterator_state itite myObject->end_state();
for(
it myObject->begin_state(); it != ite; ++it)
    
vrShaderInfrastructure::instance()->shaderize(*it); 

As you can see, this can be a bit cumbersome depending upon the details of the application. It would be better to setup the known projected light lobes before configure.