PDA

View Full Version : Create second context



Godlike
04-28-2011, 04:54 AM
Im using SDL 1.3 to create a window and a rendering context for that window (see this tutorial (http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Co ntext_in_SDL_(C_/_SDL)))

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!

BionicBytes
04-28-2011, 04:57 AM
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.

idwakest
04-28-2011, 03:05 PM
If anyone has an idea... Do not use SDL :D

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)

hound
04-29-2011, 04:40 AM
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.

Godlike
04-29-2011, 10:08 AM
I've made some tests with SDL but nothing's conclusive at the moment. When I have a solution I will post it here.