Hello Simon, On 09/26/2011 08:35 PM, Simon Bouvier-Zappa wrote: > We are using several instances of OSG::PassiveWindow in our application > to handle our several opengl widgets which all use a shared opengl context. > > For a single 3d object, we are using one scene graph for all widgets. > When we do the rendering however, it seems to create double the textures > and double the display lists for the same object in two different > views. I would have thought that OSG::Window::validateGLobject would > have reused the same opengl id for the same context. Is this validation > window dependent ?
OpenSG windows essentially represent OpenGL contexts, so each window instance is considered to be a different context. Can you use the same PassiveWindow for all widgets so that OpenSG is made aware that it really is only dealing with a single shared GL context? > Also, as a side effect of this first issue, we are noticing that every > opengl texture as well as opengl display list is not getting destroyed > when closing a particular widget (and destroying its specific > OSG::PassiveWindow). Is there some way to enforce clean up of opengl ids ? the basic problem is that when the window is destroyed there is in general no guarantee that the OpenGL context is active (to make calls like glDeleteTextures()), so OpenSG only decrements the ref count on the internal object that represents an OpenGL resource. In the assumed setup where a window corresponds to a GL context this is not a big problem since all GL resources associated with the context are freed when the context itself is destroyed - in your current setup that does not quite work because you have multiple window instances representing the same GL context. Therefore switching to a single window per context should solve this problem as well. Cheers, Carsten ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users