[SDL] SDL OpenGL context and threads
arxeio at gmail.com
Fri Dec 31 16:06:25 PST 2010
I had to start the OpenGL SDL context from the thread of OGL and it
tolerated having SDL_Init on the main thread.
Is it possible to start the context on the main thread without
crashing (not that it has do, for informational purposes).
I heard from OGL generic info that the context has to become "current
for the thread using it".
Is it possible to make the GL SDL context "current" for another thread?
On Fri, Dec 31, 2010 at 3:19 PM, Paulo Pinto <pjmlp at progtools.org> wrote:
> the best way is to have just one thread deal with OpenGL commands. You may
> have other threads
> doing some other type of processing and then send the data ready to be sent
> to OpenGL to the
> drawing thread that owns the OpenGL context.
> On Fri, Dec 31, 2010 at 1:28 AM, Michael Menegakis <arxeio at gmail.com> wrote:
>> It's known that OpenGL drivers usually don't tolerate threading.
>> However, does one have to deal with the main thread of SDL that
>> brought up a GL context? If one spawns a thread and from then on only
>> from there dispatches OpenGL commands will it be safe? Or does it have
>> to be restricted to the main thread that brought up the SDL GL
>> SDL mailing list
>> SDL at lists.libsdl.org
> SDL mailing list
> SDL at lists.libsdl.org
More information about the SDL