c++ - 与 OpenGL ES 共享 egl 上下文

标签 c++ c opengl-es egl

创建一个 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.

关于c++ - 与 OpenGL ES 共享 egl 上下文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29278507/

相关文章:

c - STM32 HAL GPIO中断计数太多

c++ - 未处理的异常 : 0x80000001: Not implemented. (VC++)

c++ - 为什么我的线程不能正常退出?

c++ - 我可以在 C++ 中返回一个跨度吗?如果是这样,如何? (对替代品持开放态度。)

c++ - 将代码从 C 转换为 C++ 时无法理解错误消息

c - 尝试使用管道读取/写入另一个程序

ios - 如何将多重纹理用作一种纹理?

android - Android 模拟器上缺少 OpenGL 驱动程序

iPhone 成本与 yield - OpenGL ES 1.x 与 2.0

c++ - 多线程访问 unordered_map 时出现运行时错误