Why use multiple OpenGL context

Posted by Luca on Stack Overflow See other posts from Stack Overflow or by Luca
Published on 2009-09-04T05:23:18Z Indexed on 2010/03/29 10:23 UTC
Read the original article Hit count: 358

Filed under:

For rendering I have a current GL context, associated to a window. In the case the application render multiple scenes (for example using accumulation or different viewports) I think it is ok to reuse the same context.

My question, indeed, is: why should I use multiple GL context? I red on ARB_framebuffer_object extension spec that MakeCurrent call could be expansive, and in the case the ARB_framebuffer_object extension is present I can render on a generic buffer without using MakeCurrent.

Apparently the only reason to use multiple GL context is to avoid to setup context state (pixel store, transfer, point size, polygon stipple...) or to have avaialable multiple render buffers configuration (one context with accumulation, another without). How to determine when is better an alternative context instead of setting context state?

Thankyou all!

© Stack Overflow or respective owner

Related posts about opengl