Sharing texture objects and buffer objects

According to the (old) MSDN documentation, wglShareLists() shares display lists. However, I suspect that it’s common practice for most OpenGL implementations to also share texture objects and buffer objects when sharing display lists.

So, is it correct to state that wglShareLists() also shares texture objects and buffer objects?

More importantly, where would I find this documented?

Yes, textures are shared, but I can’t find any Microsoft documentation that mentions the word ‘texture’.

Anything that is an object in GL is shared : display lists, texture, shaders (all types), VBO, FBO, PBO

More importantly, where would I find this documented?
There isn’t any documentation or maybe the FAQ here has this info.

From OpenGL FAQ ::

21.080 Can I share textures between different rendering contexts?

Yes, if you use texture objects. Texture objects can be shared the same way display lists can. If you’re using Microsoft Windows, see the wglShareLists() function. For a GLX platform, see the share parameter to glXCreateContext().

VBO spec mentions the ability to shared VB objects, the same should be true for other objects spec.

Originally posted by V-man:
Anything that is an object in GL is shared : display lists, texture, shaders (all types), VBO, FBO, PBO

There are exceptions, e.g. occlusion query objects are not shared. Documented in
http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt

Hm, yeah, I wrote that FAQ, honestly can’t recall where I got the information though, whether wglShareLists is spec’d to share texture objects (and buffer objects), or most vendors just provide that functionality by convention.

The 2.0 spec says nothing about sharing objects between contexts, but the spec is intentionally vague on contexts, so I’m not surprised.

Thanks for the pointer to the extension documentation though. I’ll look that over.

Thanks for correcting me, Relic.

PaulMartz0, there is no WGL spec. As you may already know, MS does not update their GL documentation.
The GL spec (2.0 and all) does not document platform specific functions.

Thanks, Nicolas – I found the issue on sharing in the old VBO spec, essentially, “VBOs are shared as display lists are shared,” which makes it clear that wglShareLists must also share VBOs to conform to the spec. Textures were also mentioned.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.