Re: SDL_CreateRGBSurface in second thread?

"Naith" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
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.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.