OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

decoratorStateGraph


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
danoo
Appreciator


Joined: 16 Dec 2011
Posts: 146

PostPosted: Thu Mar 31, 2016 9:28 am    Post subject:
decoratorStateGraph
Reply with quote

Hi all

I have a gereral question about the use of decoratorStateGraph concept in the shadow classes. In the VDSM shadow classes we find:


Code:

    cv.pushStateSet( _shadowRecievingPlaceholderStateSet.get() );

    osg::ref_ptr<osgUtil::StateGraph> decoratorStateGraph = cv.getCurrentStateGraph();

    cullShadowReceivingScene(&cv);

    cv.popStateSet();


and later on a call to:

Code:

decoratorStateGraph>setStateSet(selectStateSetForRenderingShadow(*vdd));


What is the reason for doing this? I also figured that the selected stateset in vdd is always cleared and rebuild per frame. I have the impression that this comes at a performance cost. Why not building the stateset once and pushing it directly into the cv instead of the placeholder?

Cheers,
Daniel
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10908

PostPosted: Thu Mar 31, 2016 10:08 am    Post subject:
decoratorStateGraph
Reply with quote

Hi Daniel,


This topic is not appropriate for the osg-submissions which is reserved just for submission.


Robert.


On 31 March 2016 at 10:28, Daniel Schmid < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi all

I have a gereral question about the use of  decoratorStateGraph concept in the shadow classes. In the VDSM shadow classes we find:



Code:

    cv.pushStateSet( _shadowRecievingPlaceholderStateSet.get() );

    osg::ref_ptr<osgUtil::StateGraph> decoratorStateGraph = cv.getCurrentStateGraph();

    cullShadowReceivingScene(&cv);

    cv.popStateSet();




and later on a call to:


Code:

decoratorStateGraph>setStateSet(selectStateSetForRenderingShadow(*vdd));




What is the reason for doing this? I also figured that the selected stateset in vdd is always cleared and rebuild per frame. I have the impression that this comes at a performance cost. Why not building the stateset once and pushing it directly into the cv instead of the placeholder?

Cheers,
Daniel

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66686#66686





_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP