[osg-users] OSG + QT and QTabWidget: Disappearing scene graph

2010-12-02 Thread Angus Lau
Hi,

I am trying to build a Qt application with multiple independent OSG scene 
graphs, each of which in it's own tab in a QTabWidget. I am using the 
osgViewer::Viewer (not osgViewer::CompositeViewer) version of the adapter 
widget from the osgviewerQT example. Each tab has an instance of the adapter 
widget managing it's scene graph. 

When the application has more than one tabs and when I try to close one of 
them, sometimes the scene graph in the other tab may disappear, but I can still 
pick a node in the scene graph.

 Some people fixed a similar situation by sharing/not sharing the graphics 
context among the widgets, but none of the solutions that people suggested for 
the situations fix my problem.

I wonder if I should use a different approach for the OSG + QT integration or 
if I need to do something particular to the graphics context. I appreciate all 
of your suggestions.

Thank you!

Cheers,
Angus Lau

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





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


Re: [osg-users] How should I organize the scene graph to handle 2 million points and lines?

2009-11-03 Thread Angus Lau
Hi,

Thank you for both of your help. It seems that PagedLOD is what I need to use 
to reduce CPU memory usage. I have tried to use PagedLOD briefly before, but I 
am not clear how I can make PagedLOD unload the unused child nodes once those 
child nodes are loaded. It seems that my PagedLOD nodes do not remove the nodes 
once it creates the child nodes. Could you please give me some explanation 
about the proper way of using it??


Thank you!

Cheers,
Angus

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





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


Re: [osg-users] How should I organize the scene graph to handle 2 million points and lines?

2009-11-02 Thread Angus Lau
Hi,

Thank you for your suggestions! I think the scribe effect is probably what I 
want for selection.

You mentioned something about unreferencing data on the CPU side once it is 
uploaded. I am quite interested in this. Could you please give me more details?

Honestly speaking, the 2 million points and lines are probably not the largest 
dataset I will encounter. During the last few days, I discovered that my viewer 
probably has an acceptable performance, but the large amount of memory that it 
uses is probably the main issue I need to deal with. If there are some ways 
that can reduce the size of the scene graph or cache inactive part of the scene 
graph on disk, I would like to give them a try.

Thank you!

Cheers,
Angus

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





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


[osg-users] How should I organize the scene graph to handle 2 million points and lines?

2009-10-29 Thread Angus Lau
Hi,

I am trying to build a viewer that can display millions of points and lines. 
How should I organize or structure the scene graph to maximize the performance 
and minimize the memory usage?

Thank you!

Cheers,
Angus

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





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


Re: [osg-users] How should I organize the scene graph to handle 2 million points and lines?

2009-10-29 Thread Angus Lau
Hi,

Thank you for your help. I would like to show as many lines and points as 
possible at one time. Since some lines and points are clustered together, I am 
thinking about using LOD, PagedLOD, Impostor, or something similar to make 
culling and drawing take less time, but my viewer is actually an inspection 
tool. It is better to show as much details as possible. My viewer needs to 
support Pan, Zoom, Orbit, and Select.

The position of the lines and points are static but their colors are used for 
selection. My viewer allows the user to select one or more lines and points by 
changing their color. Right now, I am grouping chunks of lines in some 
osg::Geometry nodes and storing their colors in the color arrays. When the user 
select a line, for example, I will change the color of the line in the color 
array. Even though the grouping improve the viewer performance a lot, unrelated 
lines or points are now grouped together, making the scene graph inflexible to 
be used in other ways. Also, is changing the color to show the selection a bad 
idea? Other ways of showing the selected lines and points are fine, as long as 
I can improve the performance and the memory usage.

The lines and points also take up a lot of memory ( 1GB) in the scene graph. 
Large memory allocation may also be the cause of a long loading time for the 
data. Is there a way to reduce the memory usage for the scene graph?



Thank you!

Cheers,
Angus

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





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