Hi,

   We have a pretty complex software, under windows, that have a window the 
user can close and open for 3D rendering with OSG.

   When the user close the window we delete all OSG object except some node 
create from .osg or .ive files to speed up the next load process.

   The first time the user open the window we create the viewer and we load the 
nodes and everything just work perfectly. When the user close the window, 
everything is delete and we keep some nodes in a table.

   The next time the user open the window we recreate the viewer and we create 
new node and use again node store in the table. In this second or subsequent 
creation of the window we have some or all of the nodes, stock in the table, 
that are not display correctly. The nodes newly create are always corrects.

   By example, if we have a table with four objects (car, plane, box and ball) 
the ball can be show in place of the car or sometime just nothing is showed.

   We believe we using the correct geode because of the followings test: First 
we save the geode in osg file for the first time we open the window when the 
geode is correct and in the next time the geode is not correct. We compare the 
two files and the only difference are UniqueID MatricTransform_0 and UniqueID 
StateSet_0.

Second we draw a bounding box around the object and the bounding correspond to 
the object we expected to be show.  We use the ComputeBoundVistor to find the 
dimensions of the object.

   The software is also use in a realty center (cave) when in this 
configuration we use 4 cameras when each camera represent a wall of the cave. 
We have one master camera with three slaves cameras sharing the same scene data 
and the same viewer.

   In this configuration we can also observe the problem but in a different 
manner. Some camera show the right geode and some show a wrong geode. We only 
have to move the geode from one camera to another to see the two representation 
of the geode. Like in one camera mode, the problem is never present the first 
time we open the windows.

   To clear the osg environment, we only set all reference pointer we use to 0 
(viewer, scenegraph, cameras, etc). We also verify in the debug log that the 
destructor of the viewer is called.

   But according to the log, it seem the 'GraphicContext' is not completely 
close.

   Do we have to do something else to perfectly clean all the OSG environment. 
Does OSG use internal cache table that we need to reset ?

Thank you!

Cheers,
Sylvain

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





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

Reply via email to