Re: [osg-users] Sharing PagedLOD node in multiple osgViewer::Viewer windows

2009-10-22 Thread Emmanuel Roche
Hello Robert !

I followed this thread as I'm facing the same issue Justin discovered:

- I'm on Windows (XP  Vista)
- using OSG 2.8.2
- using wxWidgets 2.8

And I built a multiple view application.
Thoses views are currently built around multiple osgViewer::Viewer objects.
Some of those views may be hidden by the user (they are inside advanced
notebook controls).

I'm currently not using CompositeViewer for two reasons:
1. [the most important] compositeviewer would expect to render all the
views, and if some are hidden this would lead to an issue due to wxWidgets
wxGLCanvas makeCurrent() implementation.
2. My scene must be updated specifically by each viewer, and the each
_updateVisitor has a user data pointer to the viewer itself, whereas the
compositeviewer only as a single _updateVisitor and update the scenes only
once per cycle.

Now I'm also using a PagedLOD in my scene, and when I have 2 different
camera positions, the database pagers seem to get confused. (I tried
multiple db pagers or one shared DB pager, the result is the same).

Why I really wan to know is: where should I look for explanations on the
(supposed?) proper behavior of the CompositeViewer in that case in the
sources ? As it may be easier for my to implement this part in the existing
system rather than switching to CompositeViewer usage.


Otherwise, if I have to switch:
- Concerning my point 1) I supposed I could force the OpenGL context
SetCurrent() call, but then to save ressources, I supposed I can use a
nodemask of 0x0 for the hidden view master cameras, am I wrong ?

- Concerning my point 2) what would be the best (and is there a way in fact
?!) to force a compositeviewer to update each scene just before rendering it
(as some update callbacks will modify the scene depending on the window 
view where it will be rendered ? According to my understanding of
compositeviewer, this would just break everything (the updateTraversal()
function then rendering for all views concept would not hold anymore!)



Cheers!
Manu.



2008/9/28 Robert Osfield robert.osfi...@gmail.com

 Hi Justin,

 Could you please switch to using a CompositeViewer with multiple
 Views, rather than multiple Viewers, as you usage model is intended to
 be supported by CompositeViewer, you are much more likely to find
 success/stability when using the OSG in the way it's intended.

 Also try moving up to OSG 2.6, 2.7.x or SVN/trunk as there are plenty
 of improvements across the board, including to paging and multiple
 window work, I can't say for certain this will fix you problem, but
 there it's definitely worth a try.

 Robert.

 On Sat, Sep 27, 2008 at 1:58 AM, KSpam keesling_s...@cox.net wrote:
  My application utilizes a osg::PagedLOD node for terrain that is shared
 across
  multiple osgViewer::Viewer instances.  The terrain paging works
 beautifully
  when I only have a single window open; however, there are issues whenever
 I
  open a second window.
 
  Some of the issues I see are:
  1) Window 1 appears to revert to the lowest LOD
  2) Window 1 and 2 seem to flicker as if fighting over which texture or
 tile
  should be visible
  3) Sometimes window 2 textures are missing for some tiles (i.e. white
  background)
 
  I suspect that I might be using osgDB::DatabasePager improperly.  I have
 tried
  sharing the same osgDB::DatabasePager across all osgViewer::Viewer
 instances,
  and I have also tried using a unique osgDB::DatabasePager for each
  osgViewer::Viewer instance.  What is the correct approach?
 
  Any ideas as to what I am doing wrong?  Any suggestions for me to try?
 
  I am using OSG 2.4.
 
  Thanks,
  Justin
  ___
  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


Re: [osg-users] Sharing PagedLOD node in multiple osgViewer::Viewer windows

2008-10-06 Thread KSpam
Robert,

 Could you please switch to using a CompositeViewer with multiple
 Views, rather than multiple Viewers, as you usage model is intended to
 be supported by CompositeViewer, you are much more likely to find
 success/stability when using the OSG in the way it's intended.

I took your advice and converted my application over to using CompositeViewer.  
It required quite a bit of work to my codebase, but I am very happy with the 
results.  In addition to having working paged terrain across multiple views, 
I also got a significant improvement in the framerate!

 Also try moving up to OSG 2.6, 2.7.x or SVN/trunk as there are plenty
 of improvements across the board, including to paging and multiple
 window work, I can't say for certain this will fix you problem, but
 there it's definitely worth a try.

I am still using OSG 2.4, as I do not have the option to upgrade at this time.

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


Re: [osg-users] Sharing PagedLOD node in multiple osgViewer::Viewer windows

2008-09-28 Thread Robert Osfield
Hi Justin,

Could you please switch to using a CompositeViewer with multiple
Views, rather than multiple Viewers, as you usage model is intended to
be supported by CompositeViewer, you are much more likely to find
success/stability when using the OSG in the way it's intended.

Also try moving up to OSG 2.6, 2.7.x or SVN/trunk as there are plenty
of improvements across the board, including to paging and multiple
window work, I can't say for certain this will fix you problem, but
there it's definitely worth a try.

Robert.

On Sat, Sep 27, 2008 at 1:58 AM, KSpam [EMAIL PROTECTED] wrote:
 My application utilizes a osg::PagedLOD node for terrain that is shared across
 multiple osgViewer::Viewer instances.  The terrain paging works beautifully
 when I only have a single window open; however, there are issues whenever I
 open a second window.

 Some of the issues I see are:
 1) Window 1 appears to revert to the lowest LOD
 2) Window 1 and 2 seem to flicker as if fighting over which texture or tile
 should be visible
 3) Sometimes window 2 textures are missing for some tiles (i.e. white
 background)

 I suspect that I might be using osgDB::DatabasePager improperly.  I have tried
 sharing the same osgDB::DatabasePager across all osgViewer::Viewer instances,
 and I have also tried using a unique osgDB::DatabasePager for each
 osgViewer::Viewer instance.  What is the correct approach?

 Any ideas as to what I am doing wrong?  Any suggestions for me to try?

 I am using OSG 2.4.

 Thanks,
 Justin
 ___
 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] Sharing PagedLOD node in multiple osgViewer::Viewer windows

2008-09-26 Thread KSpam
My application utilizes a osg::PagedLOD node for terrain that is shared across 
multiple osgViewer::Viewer instances.  The terrain paging works beautifully 
when I only have a single window open; however, there are issues whenever I 
open a second window.

Some of the issues I see are:
1) Window 1 appears to revert to the lowest LOD
2) Window 1 and 2 seem to flicker as if fighting over which texture or tile 
should be visible
3) Sometimes window 2 textures are missing for some tiles (i.e. white 
background)

I suspect that I might be using osgDB::DatabasePager improperly.  I have tried 
sharing the same osgDB::DatabasePager across all osgViewer::Viewer instances, 
and I have also tried using a unique osgDB::DatabasePager for each 
osgViewer::Viewer instance.  What is the correct approach?

Any ideas as to what I am doing wrong?  Any suggestions for me to try?

I am using OSG 2.4.

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