class EAGLSharegroup
一个EAGLSharegroup管理一个或多个EAGLContext对象所关联的资源。它在一个EAGLContext初始化时创建,在最后一个EAGLContext被释放时抛弃。作为一个不透明的对象,他没有可以访问的API.
Overview
当前,the sharegroup manages textures, buffers, framebuffers, and renderbuffers.当这些共享对象被这个sharegroup的多个contexts共享时,你的应用程序有责任管理这些对象状态的变化。改变一个正在被另一个context渲染的共享对象的状态的结果是未定义的。为了得到确定性的结果,你的应用程序在修改它时,必须执行明确的步骤,来确保shared object当下没有被渲染。进一步,共享对象状态的改变不保证对另一个context也可见,除非这个context重新绑定这个共享对象。
To ensure defined results of state changes to shared objects across contexts in the sharegroup, your application must perform the following tasks, in this order:
1.Call glFlush on the rendering context that issues the state-modifying routines.
2.Call glBindTexture or glBindBuffer on the rendering context that depends on the texture or vertex buffer object state changes, respectively.
A shared object is not deleted until it is no longer bound to any context.