Hello Shayne,

I have multiple views in a single window. I create four views and one camera 
per view.

Example:

camera1->setViewport(0,0,400,300);
camera2->setViewport(400,0,400,300);
camera3->setViewport(0,300,400,300);
camera4->setViewport(400,300,400,300);

view1->setCamera(camera1);
view2->setCamera(camera2);
view3->setCamera(camera3);
view4->setCamera(camera4);

viewer->addView(view1);
viewer->addView(view2);
viewer->addView(view3);
viewer->addView(view4);

But I add a rtt camera in the scene graph of every view. And in this camera is 
the position (x,y) not important. It must be zero. Now I see it is logical.

But I have another problems now. The stereoscopic option doesn't work with the 
RTT. Have you a hint for me about this?

Thank you

Martin

-------- Original-Nachricht --------
> Datum: Tue, 15 Feb 2011 09:20:04 -0700
> Von: "Tueller,        Shayne R Civ USAF AFMC 519 SMXS/MXDEC" 
> <[email protected]>
> An: "OpenSceneGraph Users" <[email protected]>
> Betreff: Re: [osg-users] RTT and MatrixManipulator

> Martin,
> 
> How do you have your composite viewer set up? Is it multiple views in a
> window or a single view per window?
> 
> If you're using multiple views/viewports embedded in a single window, the
> viewport (x,y) are relative to the window. If your views are set up in
> separate windows (i.e. a view & viewport per window) then the viewport (x,y)
> are (0,0). From what you described, I would guess it's the latter.
> 
> Each view/camera should have a viewport defined otherwise things won't
> draw (they're clipped out).
> 
> -Shayne
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of "Martin 
> Großer"
> Sent: Tuesday, February 15, 2011 7:29 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] RTT and MatrixManipulator
> 
> I think it works now! My problem was in the following line:
> 
> rtt_cam->setViewport(_x,_y,_width,_height);
> 
> _x and _y musst be zero in all views. I guess it makes sense, but I am not
> sure. However, I wrote rtt_cam->setViewport(0,0,_width,_height); and it
> works fine!
> 
> Cheers
> 
> Martin
> 
> -------- Original-Nachricht --------
> > Datum: Tue, 15 Feb 2011 14:40:18 +0100
> > Von: "Martin Großer" <[email protected]>
> > An: OpenSceneGraph Users <[email protected]>
> > Betreff: Re: [osg-users] RTT and MatrixManipulator
> 
> > Ok it works for one view in my composite viewer. The problem was my
> > texture. It didn't have the right size. However, I have 4 views and the
> render to
> > texture only works for the first view.
> > 
> > I get the following message: RenderStage::runCameraSetUp(), FBO setup
> > failed, FBO status= 0x8cd9
> > 
> > Is render to texture per view of a composite viewer possible? There are
> > any experience about this?
> > 
> > Cheers
> > 
> > Martin
> > 
> > 
> > -------- Original-Nachricht --------
> > > Datum: Tue, 15 Feb 2011 12:50:34 +0100
> > > Von: "Martin Großer" <[email protected]>
> > > An: [email protected]
> > > Betreff: [osg-users] RTT and MatrixManipulator
> > 
> > > Hello,
> > > 
> > > I want to render my scene in a texture and after this I want to use
> that
> > > texture on a Plane in the front of a ortho camera. My question is how
> > can I
> > > use the matrix manipulator on the rtt camera?
> > > 
> > > Here my idea to do this, but it doesn't work. It is only a short form
> of
> > > the code to show my scene graph structure.
> > > 
> > > // Plane
> > > plane->getOrCreateStateSet()->setTextureAttributeAndModes(0,texture,ON
> |
> > > OVERRIDE); 
> > > 
> > > // RTT Camera
> > > rtt_cam->setRenderTargetImplementation( FRAME_BUFFER_OBJECT );
> > > rtt_cam->attach(COLOR_BUFFER, texture, 0, 0);
> > > 
> > > // Ortho Camera
> > > ortho_cam->addChild(plane);
> > > ortho_camsetReferenceFrame(::osg::Transform::ABSOLUTE_RF);
> > > ortho_cam->setProjectionMatrixAsOrtho2D(0.0,1.0,0.0,1.0);
> > > ortho_cam->setViewMatrix(::osg::Matrix::identity());
> > > ortho_cam->setRenderOrder(::osg::Camera::POST_RENDER);
> > > 
> > > // Root Node
> > > root->addChild(scene);
> > > root->addChild(ortho_cam);
> > > 
> > > // View
> > > view->setCamera(rtt_cam);
> > > view->setSceneData(root);
> > > view->setCameraManipulator(trackball);
> > > 
> > > 
> > > Any ideas?
> > > 
> > > Thanks and best regards
> > > 
> > > Martin
> > > -- 
> > > Schon gehört? GMX hat einen genialen Phishing-Filter in die
> > > Toolbar eingebaut! http://www.gmx.net/de/go/toolbar
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > >
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> > -- 
> > GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
> > gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> -- 
> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Schon gehört? GMX hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://www.gmx.net/de/go/toolbar
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to