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


Re: [osg-users] controlling swap

2008-11-10 Thread Robert Osfield
Hi Ed,

I wrote about this exact topic a couple of weeks back, so go have look
through the archives on this discussion.

The short story is that I moving between the two is not difficult, and
I'd start with the easier of the two viewers's - osgViewer::Viewer but
learn a bit about CompisteViewer too so you know roughly what you
might need to change later.

Robert.

On Mon, Nov 10, 2008 at 3:34 AM, Ed [EMAIL PROTECTED] wrote:
 After reading osgViewer::Viewer vs osgViewer::CompositeViewer, I think I
 might need to use CompositeViewer at some point in the future of my project,
 but not at the outset.  Should I begin with the CompositeViewer, or make the
 necessary mods later?  How difficult is it to change from Viewer to
 CompositeViewer later?

 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


Re: [osg-users] controlling swap

2008-11-10 Thread Ed
I think the discussion you refer to was initiated by my question then 
too.  I am not sure how this question ended up in this email...  I was 
copying and pasting and something went wrong, but the subject line 
indicates what the topic was meant to be.  I have resubmitted the 
correct question.

Ed

Robert Osfield wrote:

Hi Ed,

I wrote about this exact topic a couple of weeks back, so go have look
through the archives on this discussion.

The short story is that I moving between the two is not difficult, and
I'd start with the easier of the two viewers's - osgViewer::Viewer but
learn a bit about CompisteViewer too so you know roughly what you
might need to change later.

Robert.

On Mon, Nov 10, 2008 at 3:34 AM, Ed [EMAIL PROTECTED] wrote:
  

After reading osgViewer::Viewer vs osgViewer::CompositeViewer, I think I
might need to use CompositeViewer at some point in the future of my project,
but not at the outset.  Should I begin with the CompositeViewer, or make the
necessary mods later?  How difficult is it to change from Viewer to
CompositeViewer later?

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

  


___
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


Re: [osg-users] controlling swap

2008-11-09 Thread Jean-Sébastien Guay

Hi Ed,

After reading osgViewer::Viewer vs osgViewer::CompositeViewer, I think 
I might need to use CompositeViewer at some point in the future of my 
project, but not at the outset.  Should I begin with the 
CompositeViewer, or make the necessary mods later?  How difficult is it 
to change from Viewer to CompositeViewer later?


If I remember correctly, at the end of that very thread it was mentioned 
that the switch is not hard at all.


However, using CompositeViewer is not that much overhead over Viewer, so 
if you will need it for sure I would start out with CompositeViewer at 
the start, so that everything is already there and you don't have any 
surprises.


Just my opinion, mind you.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] controlling swap

2008-11-09 Thread Ed
After reading osgViewer::Viewer vs osgViewer::CompositeViewer, I think 
I might need to use CompositeViewer at some point in the future of my 
project, but not at the outset.  Should I begin with the 
CompositeViewer, or make the necessary mods later?  How difficult is it 
to change from Viewer to CompositeViewer later?


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

2008-11-09 Thread Rahul Jain
Hi Ed,

I would also recommend  to use osgViewer::CompositeViewer from the
starting. The reason is that   osgViewer::Viewer can be mimicked  by 
osgViewer::CompositeViewer containing a single osgViewer::View

RJ

Jean-Sébastien Guay wrote:
 Hi Ed,

 After reading osgViewer::Viewer vs osgViewer::CompositeViewer, I
 think I might need to use CompositeViewer at some point in the future
 of my project, but not at the outset.  Should I begin with the
 CompositeViewer, or make the necessary mods later?  How difficult is
 it to change from Viewer to CompositeViewer later?

 If I remember correctly, at the end of that very thread it was
 mentioned that the switch is not hard at all.

 However, using CompositeViewer is not that much overhead over Viewer,
 so if you will need it for sure I would start out with CompositeViewer
 at the start, so that everything is already there and you don't have
 any surprises.

 Just my opinion, mind you.

 J-S

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