Hi,

On Tue, 2009-06-02 at 03:16 -0300, daniel trindade wrote:
> Hi Carstern,
> 
> First of all, thanks for the help. As i said, i'm trying to render to
> texture using fboviewport, but with no success. 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. Also, i need a viewport with a different size from
> the aplication, and the camera will be pointing to other point.
>
> To do this, i create the following code. This is not exactly what i
> need to do, but it's only for testing:
> 
> CreateFboViewport( OSG::Node* scene, int width, int height )
> {
>     // Set up the scene to be rendered on the texture buffer
>     _fboSceneRoot = OSG::Node::create();
>     _fboSceneRoot->setCore( OSG::Group::create() );
>     _fboSceneRoot->addChild( scene );

      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

is scene anywhere else the parameter of addChild ? If so try to use
a VisitSubTree core for _fboSceneRoot and pass scene to that one
instead of adding it as a child to _fboSceneRoot. OpenSG is a single
parent graph, so successive addChilds will take the child out of it's
old parent to make sure the graph is consistent.


kind regards,
  gerrit







------------------------------------------------------------------------------
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