[SDL] SDL on IOS with input and rendering on seperate threads

Nathaniel J Fries nfries88 at yahoo.com
Thu Mar 14 13:27:01 PDT 2013

You can always handle input on its own thread. SDL's event queue is, quite literally, a thread-safe queue of "SDL_Event"s. However, on most systems (Windows included), SDL must fill this event queue from the main thread.

So, if this concurrency is demanded by the unique needs of your application, what you will need to do is to reverse the way you have the program split up: render on the main thread, handle events in a new thread. However, you will want to actually call SDL_PumpEvents() from your main thread loop.

Nate Fries

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130314/b2b330e1/attachment-0009.htm>

More information about the SDL mailing list