Hello Daniel,

daniel trindade wrote:
> In my application, i need to render the scene on the screen and also on 
> a texture. As you  suggested,  i'm using FBO and simple stage:
> 
>           root
>           |
>           +- SimpleStage
>          |      |
>          |      +- VisitSubTree -> ApplicationScene
>           |
>           +- ApplicationScene...
> 
> 
> How can i set a specific node of ApplicationScene to be rendered on the 
> screen, but not by the simple stage?
> 
> Is there a way to do that using travmask?

a node (and the subtree below it) are only visited by the RenderAction 
if the bitwise AND of the node's travmask and the action's travmask is 
not zero. Since you are rendering the same ApplicationScene you can't 
have different travmasks on the node depending on whether it is is drawn 
to the FBO or screen.
One way to achieve what you want is to render the two pieces not with a 
single call to renderAction->apply(root); but instead do this:

renderAction->setTravMask(FBOMask);
renderAction->apply(simpleStage);

renderAction->setTravMask(ScreenMask);
renderAction->apply(appScene);

Another alternative would be to add a core that changes the trav mask 
when the RenderAction enters it and restores the previous value when the 
action leaves the core again.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to