Hello David,
So I use the FRAME_BUFFER_OBJECT and I have a NVIDIA GTX 470 grafics card.
I tried the osgprerendercubemap, but I cannot print out the frame rate.
Additionally I tried the osgprerender example and I get a frame rate of around
3500 FPS.
Here my Implementation:
osg::ref_ptr<osg::Image> img = osgDB::readImageFile("image.tga");
osg::ref_ptr<osg::Group > rtt = new osg::Group;
root->addChild(rtt);
osg::ref_ptr<osg::Camera> camera = new osg::Camera;
camera->addChild( scene );
camera->setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
camera->setViewport(0,0,2048,2048);
camera->setRenderOrder(osg::Camera::PRE_RENDER, 0);
camera->setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT );
camera->attach(osg::Camera::COLOR_BUFFER, img, 0, 0);
rtt->addChild(camera.get());
Is the image format (internal format) a problem?
Thanks
Martin
-------- Original-Nachricht --------
> Datum: Wed, 2 Feb 2011 13:56:09 +0100
> Von: David Callu <[email protected]>
> An: OpenSceneGraph Users <[email protected]>
> Betreff: Re: [osg-users] Render To Texture is very slow
> Hi Martin
>
>
> What is your Hardware/Software configuration?
> Which osg::Camera::RenderTargetImplementation did you use in your code ?
>
> Try the osgprerendercubemap example to test performance of your hardware.
>
> HTH
> David Callu
>
>
> 2011/2/2 "Martin Großer" <[email protected]>
>
> > Hello,
> >
> > I would like use render to texture in every render step. My texture
> > resolution is 2048 x 2048 and it is very slow. There are tipps and
> tricks to
> > speed up the render to texture?
> > With 2048 x 2048 I get around 15 FPS and with 1024 x 1024 I get 45 FPS.
> >
> > Thanks
> >
> > Martin
> > --
> > Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
> > Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org