Hello Daniel,

daniel trindade wrote:
> First of all, thanks for the help. As i said, i'm trying to render to 
> texture using fboviewport, but with no success.

hm, looking through the code of FBOViewport, it looks like something 
broke it, sorry about that.
Please switch to using a SimpleStage, see my previous mail for pointers 
to examples that use it and do pretty much the same as you want.

> I took a look on 
> simplestage, but i'm not sure if it will fit to my needs. My objective 
> is to render the screen to a texture buffer without modifing the  
> aplication scene.

the scene as far as the application is concerned would not really have 
to change, but you'd put a small tree on top of it:

        root
         |
         +- SimpleStage
        |       |
        |       +- VisitSubTree -> ApplicationScene
         |
         +- VisitSubTree -> ApplicationScene

See Gerrit's mail for more info why you need VisitSubTree here.
If you don't want to update the FBO texture every frame, you can use a 
traversal mask on the Node with the SimpleStage core and the RenderAction:
A node and its subtree are only visited if the bitwise-AND of the node's 
trav mask with the action's trav mask is non-zero.

> Also, i need a viewport with a different size from the 
> aplication, and the camera will be pointing to other point.

SimpleStage has a camera, a background and the left,right,top,bottom 
fields let you restrict rendering to a sub-rectangle of your FBO, i.e. 
they give you a viewport.

        Cheers,
                Carsten

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to