Re: [osg-users] Controlling swap (Not the question about View vs. Composite View)

2008-11-11 Thread Ed

Are there examples for doing these techniques?
Ed

Robert Osfield wrote:

You can add your own sync code
if you want into camera initial/pre,post and final callbacks, and no
matter what threading model these will be called.  



You can also add
Rendering operations into the GraphicsContext's operations list, or
override the osgViewer::Renderer which does the actual cull and draw
traversals.

Robert.
  

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


Re: [osg-users] Controlling swap (Not the question about View vs. Composite View)

2008-11-11 Thread Robert Osfield
On Tue, Nov 11, 2008 at 2:42 PM, Ed [EMAIL PROTECTED] wrote:
 Are there examples for doing these techniques?

Search tools are your friend, the sooner you get used to use them on
the OSG the sooner I can get on with useful stuff.  Just search for
setPostDraw or setFinalDraw in the OpenSceneGraph distribution it'll
come up with all the examples.

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


[osg-users] Controlling swap (Not the question about View vs. Composite View)

2008-11-10 Thread Ed
In the Viewer examples I have seen, it appears that the rendering is 
initiated by calling viewer.run().



In my code I am implementing hardware based synchronization amonst  multiple 
renderers and I need to control the render or draw, as well as  the swap.  How 
do I get this control?  Do I use draw traversals?  Are there examples of this?  
Also under what situations would I want to use cull and update traversals?  
Examples of these?

Ed


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


Re: [osg-users] Controlling swap (Not the question about View vs. Composite View)

2008-11-10 Thread Robert Osfield
Hi Ed,

The examples are written to be focus primarily on the feature they
demonstrate so a rather minimal in terms of viewer code, viewer.run()
being a helper function that wraps up the whole rendering.  Have a
look at the implementation of run() and you'll find essentially:

 if (!viewer.isRealize()) viewer.realize();
 while(!viewer.done())
{
 viewer.frame();
}


Now viewer frame() in term is basically another help function that
wraps up the traversals, so you can rewrite in your own app:

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

The cull and draw are all wrapped up in the renderingTraversal()
method that dispatches the traversals when running single threaded or
coordinates the blocks/barriers required by each of the threading
models.

You can subclass from rendreinTraversals() if you so wished but most
of the time this will be unnecessary.  You can add your own sync code
if you want into camera initial/pre,post and final callbacks, and no
matter what threading model these will be called.  You can also add
Rendering operations into the GraphicsContext's operations list, or
override the osgViewer::Renderer which does the actual cull and draw
traversals.

Robert.


On Mon, Nov 10, 2008 at 2:29 PM, Ed [EMAIL PROTECTED] wrote:
 In the Viewer examples I have seen, it appears that the rendering is
 initiated by calling viewer.run().


 In my code I am implementing hardware based synchronization amonst  multiple
 renderers and I need to control the render or draw, as well as  the swap.
  How do I get this control?  Do I use draw traversals?  Are there examples
 of this?  Also under what situations would I want to use cull and update
 traversals?  Examples of these?

 Ed


 ___
 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