Sign in to follow this  

Multiple opengl contexts with SDL 1.3

This topic is 2105 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[s]Hey.

Has anyone managed to get multiple opengl contexts to work with SDL 1.3 ? And if so , is it safe to use more than one contexts [b]at the same time [/b]?

Thanks for looking[/s]

[b]Solved , there is an opengl wiki page about it[/b]

Share this post


Link to post
Share on other sites
Anyone searching for help on the topic may easily end up here only to be frustrated that the search must continue. So I will explain the answer clearly even if it has been “solved”.

SDL cannot provide more than what OpenGL itself provides.
OpenGL specifies that multiple contexts can be used, but unless you have very specific driver support (as in iOS devices only) you cannot share resources between them. That is a texture created on one context can only be used on that context.

Threading is no problem, but a context can only be [i]active[/i] on one thread at a time. If one thread is using a context and another thread calls *MakeCurrent(), the previous thread’s operations will start to fail.

Care must be taken to ensure this cannot happen if you are planning a multi-threaded environment.


L. Spiro

Share this post


Link to post
Share on other sites
Sign in to follow this