Create second context

Im using SDL 1.3 to create a window and a rendering context for that window (see this tutorial)

I want to create a second context for texture loading in a separate thread (according to OGL 3.3 spec the textures can be shared between contexts). The problem is that I cannot find any examples of how to do that.

Im using SDL 1.3 and GLEW and both of them seem to provide functions for context creation but no documentation.

If anyone has an idea…
Thanks in advance!

setting up rendering contexts is platform dependant.
So you may be better of posting the question on an SDL forum rather than OpenGL forum if you find you don’t get any replies.

Do not use SDL :smiley:

More seriously. SDL has not been designed to create multiple contexts (or even multiple windows…).

One way to go is to use another API. (If you can afford being OS-dependent just use win32 API or xlib, you would be able to do everything you need)

Except that Godlike is using SDL 1.3 which does support multiple windows (not so sure about contexts).

As BionicBytes said, an SDL forum would probably be a better place to ask.

I’ve made some tests with SDL but nothing’s conclusive at the moment. When I have a solution I will post it here.