Hi Johannes,
I will give that a try.

Thanks

Martin.





-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Johannes
Nilsson
Sent: 17 February 2010 22:56
To: OpenSceneGraph Users
Subject: Re: [osg-users] viewer and loops..

Hi Martin,

Use the viewer.frame() method to run event, update and rendering traversals:

while(!done)
{
    // Your code...
    viewer.frame();
}

Alternatively you can run each method separately:

viewer.realize();

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

Regards,
Johannes

On Wed, Feb 17, 2010 at 8:22 PM, Martin Naylor
<[email protected]> wrote:
> Hi all,
>
> I have not been around for a while, have just tried to convert my test
> application that was written before OSG 2.0 to run with the latest version
> of OSG from the CVS.
>
> Its been so long that it looks like osgProducer has been removed.
>
> Have figured that the equivalent is osgViewer now after looking at the
> examples.
>
>
>
> The question I have is:
>
> In my old program I used to call the sync, update, display ,method in my
> main loop.
>
> Quite simply how do you do that now, the examples seem to return
> viewer.display() from the main function so my program has no effect until
I
> hit escape and then this quits the main loop.
>
>
>
> Sorry for being so simple J
>
>
>
> Cheers
>
>
>
> Martin.
>
>
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to