gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 02:43:53 24 4
gpt4 key购买 nike

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com