- October 28, 2010 at 6:48 pm #30330
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?November 3, 2010 at 4:56 pm #34468
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.
Aaron.November 3, 2010 at 5:16 pm #34469
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.November 3, 2010 at 5:25 pm #34470
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.