Re: [osg-users] Question regarding rtt

2009-09-04 Thread Robert Osfield
Hi Brett,

On Fri, Sep 4, 2009 at 6:47 AM, Brett Thomas Leebrettle...@hotmail.com wrote:
 Thank you very much for the reply sir.If I dont want to use  viewer in my run 
 can I update the camera??If so how can i??

If you don't have a viewer then you won't be able to render anything.
It's the viewer that dispatches the update, events and rendering
traversals.  If you don't use the osgViewer classes then you are
welcome to roll your own viewer classes, if you do this you are on
your own.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Question regarding rtt

2009-09-03 Thread Robert Osfield
Hi Brett,

viewer.run() is just a convenience method, it's very easily to just
replace it with the full frame loop.

while(!viewer.done())
{
viewer.frame();
}

Or expanded further:

while(!viewer.done())
{
viewer.advance();
viewer.eventTraversal();
viewer.updateTraversal();
viewer.renderingTraversals();
}

Then set the camera in this frame loop, or... just use run() and a
camera update callback, or CameraManipulator as is done in most
examples.

Robert.

On Thu, Sep 3, 2009 at 4:54 PM, Brett Thomas Leebrettle...@hotmail.com wrote:
 Hi,

 since im using osg in my own application Theres now viewer.run().So how to 
 update it.
 Thank you!

 Cheers,
 Brett

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=17015#17015





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Question regarding rtt

2009-09-03 Thread J.P. Delport

Hi,

you only have to add the camera once. I will be traversed/updated every 
frame.


jp

Brett Thomas Lee wrote:

Hi,

 Im using osg in my application.My application consists of init() and run()
functions. Im doing all initialization stuff in init(),run() is called every 
frame and Im updating the contents of texture(rtt) by calling
root-addChild(preRenderCamera.get()); in run every frame.But the contents are 
getting updated but the application slows down after some frames.I think this is 
due to adding lots of prerendercameras every frame??
What is the way to update the camera in an efficient way??

Thank you!

Cheers,
Brett

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16977#16977





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org