Hello, I have somewhat of a weird situation. I have an application which uses a non-osg rendering system. In this application, I have my library which draws somewhere in the middle of the draw() phase of the external renderer. I actually draw twice during the external renderer's draw(), because I draw to two different parts of the screen, and because the application must draw over the top of my OSG stuff. It goes like this: external renderer draws some stuff my first osgViewer::Viewer draws some stuff external renderer draws more stuff my second osgViewer::Viewer draws some more stuff external renderer draws final stuff The reason it's like this is because the external renderer needs to draw over the top of my 3D image, and the two Viewers are drawing separate scenes. I'm doing this using two osgViewer::Viewer objects. Each OSG Viewer is unaware of the other. This setup appears to be working fine. THE PROBLEM The problem is that I have some rather large textures, and would like to use Texture::setUnRefImageDataAfterApply() to remove texture image data after it's been pushed to the scene. This works well if I only have one osgViewer::Viewer instance, but when I have two Viewers, Texture2D won't ever free the Image data because Texture::areAllTextureObjectsLoaded() will return false because the textures have not been loaded to _both_ Viewer's contexts. The reality is that in my application, they _never_will_ be loaded to both Viewer's contexts because the two viewers contain completely separate scenes (and thus textures). I can't figure out a good way to make Texture2D unref the Image. Does anyone have any ideas? This all came about because I'm in the process of upgrading my software to use OSG 2.4 from 1.0 (Yeah, it's been a while...). In OSG 2.4 (and also in 2.2) the application seems to require almost _four_times_ the system memory to load the same textures as it did in version 1.0. Has anyone else run into this? I would like to make setUnRefImageDataAfterApply() work ideally, but I'd also be happy with the OSG 1.0 amount of ram usage. A solution to either would be very much appreciated. Thank you very much, and thank you for your hard work on OSG. Alan. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
I accidently just sent this to the old openscenegraph.net list address.
If it shows up twice in your inbox, I apologize.
- [osg-users] Multiple Viewers, Multiple Scenes, Texture::set... Alan Ott

