I am trying to wrap my head around the OpenGL object model on an iPhone OS. I am currently drawing several different UIView(based on CAEAGLayers) on the screen. Currently, I use each of them as a separate one EAGLContext, each of which has color rendering and framebuffer.
I reproduce similar things in them, and I would like to split the textures between these instances in order to save memory overhead.
My real understanding is that I could use the same setting (a number of contexts, each of which has FBO / RBO), but if I create later ones using the EAGLShareGroupfirst, then I can just use the texture names (GLuints ) from the first to later. That's for sure?
If so, I assume the following question: what is the use of having a βgroupβ? Can I just reuse the same context and attach multiple FBOs / RBOs to this context? I think I'm struggling with the abstraction level of the sharegroup group, which seems to separate the βobjectsβ (textures and other named things), but not the βstateβ (matrices, enabled / disabled states) that belong to the context.
What is the best way to think about this?
Thanks for any enlightenment!
source
share