[osg-users] Texture Memory Runtime Cleanliness

Argentieri, John-P63223 John.Argentieri at gdc4s.com
Mon Oct 15 06:44:10 PDT 2007


I really need to resolve this issue. I am using multiple windows,
created not by realize(), but by our application, similar to if I were
to use GraphicsWindowEmbedded. Each window has a context that shares
with a dummy context. These contexts are managed by a class I wrote that
makes OpenGL calls. They are also each using a SceneView object and
sharing a common scene graph. I am creating and destroying textured
polygons dynamically during runtime and the memory continually grows,
despite the fact that I have relatively the same amount of textured
polygons in the scene graph at all times. I can only assume that the
textures are not being unloaded properly. I've read around on this
group, and my hunch is that I might need to use osg::GraphicsContext to
resolve this issue. 

Is that true?

If it is true, then when I load textures, which context should be
active? The shared context?

All I am trying to do is to ensure that when I unref my ref_pointer to
osg::Texture2D that the memory gets cleaned up from osg AND OpenGL.
Please, some advice? 

Thankful osg-user,
John Argentieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071015/2cf931f9/attachment-0002.htm>

More information about the osg-users mailing list