Jump to content
  • Advertisement
Sign in to follow this  
vNeeki

Multiple opengl contexts with SDL 1.3

This topic is 2352 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 at the same time ?

Thanks for looking[/s]

Solved , there is an opengl wiki page about it

Share this post


Link to post
Share on other sites
Advertisement
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 active 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  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!