Imagination PowerVR SDK Blog

context limit


Is there a limit on the number of opengl-es2 contexts?

I can only create 10 in a single process.

Also, is there a system wide (multiple-process) limit to the number of contexts?


Why do you want to create more than one context?

Note that for performance it’s best not to use eglMakeCurrent, and rendering to textures using FBOs gives you more control than using multiple contexts.



Well, this is for an application framework. Each application is interdependently developed, and should only have to be concerned with it’s own contexts state.


In that case I recommend that each “application” should have it’s own thread. If you don’t want them processing in parallel, i.e. if you want each to render a frame in turn, have a thread that round-robins each application, waking up that applications thread for a frame while sleeping itself until the frame is complete.

Your situation reminds me of the browser plug-in model, where each plug-in that uses OGLES should internally create a thread to do its work, or at least all the rendering work.

Much better to do that than to call eglMakeCurrent in a single thread as you switch between applications.


The preference for this system is to separate applications with a process boundary for security and robustness reasons.