[SDL] SDL_CreateRGBSurface in second thread?

Naith Danielane85 at hotmail.com
Wed Sep 14 02:31:10 PDT 2016

I asked the same thing about IMG_Load a while back and I got the answer that it's safe to call IMG_Load in another thread and then call SDL-specific functions (SDL_CreateTextureFromSurface for example) in the main to create the final texture.
I am using this exact solution when I create a texture in my framework. :)

Short answer: it's safe to execute IMG_Load in another thread and SDL-specific functions should be executed in the thread that created the SDL-window, which is usually the main thread.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20160914/09de075d/attachment-0001.htm>

More information about the SDL mailing list