与 OpenGL ES 共享 egl 上下文
Sharing egl Contexts wrt OpenGL ES
一个人创建了一个 eglContext:
EGLContext eglCreateContext( EGLDisplay display,
EGLConfig config,
EGLContext share_context,
EGLint const * attrib_list);
规范允许指定 share_context 允许在两个上下文之间共享对象。
如果确实指定 share_context 究竟共享什么(程序、纹理、帧缓冲区对象)?究竟什么仍然是沙盒?
另外,这种分享是双向的还是只有一种?
OGL ES 2.0.25 规范的摘录(附录 C:
共享对象和多个上下文):
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.
一个人创建了一个 eglContext:
EGLContext eglCreateContext( EGLDisplay display,
EGLConfig config,
EGLContext share_context,
EGLint const * attrib_list);
规范允许指定 share_context 允许在两个上下文之间共享对象。
如果确实指定 share_context 究竟共享什么(程序、纹理、帧缓冲区对象)?究竟什么仍然是沙盒?
另外,这种分享是双向的还是只有一种?
OGL ES 2.0.25 规范的摘录(附录 C: 共享对象和多个上下文):
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.