SDL_CreateRGBSurface in second thread? |
mediata
|
I have progress about this question i create simple program to test this case
here is thread function:
And i have no problem with drawing and loading for past 10 minutes |
|||||||||||||
|
Naith
|
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. |
|||||||||||
|