Reputation: 28932
One creates an eglContext with:
EGLContext eglCreateContext( EGLDisplay display,
EGLConfig config,
EGLContext share_context,
EGLint const * attrib_list);
The spec allows one to specify a share_context which allows object sharing between the two context.
If one does specify a share_context what exactly is shared (programs, textures, framebuffer objects)? and what exactly remains sandboxed?
Also does this sharing work both ways or only one way?
Upvotes: 1
Views: 1734
Reputation: 1768
An extraction from OGL ES 2.0.25 spec (Appendix C: Shared Objects and Multiple Contexts):
The share list of a context is the group of all contexts which share objects with that context. Objects that can be shared between contexts on the share list include vertex buffer objects, program and shader objects, renderbuffer objects, and texture objects (except for the texture objects named zero). It is undefined whether framebuffer objects are shared by contexts on the share list. The framebuffer object namespace may or may not be shared. This means that using the same name for a framebuffer object in multiple contexts on the share list could either result in multiple distinct framebuffer objects, or in a single framebuffer object which is shared. Therefore applications using OpenGL ES should avoid using the same framebuffer object name in multiple contexts on the same share list.
Upvotes: 2