• Advertisement

Archived

This topic is now archived and is closed to further replies.

Multithreaded texture loading

This topic is 5716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Because i need to load textures @ runtime, i don''t want my application to stop "drawing" frames. Therefore i want to load my textures in a different thread. Has anybody allready done this?

Share this post


Link to post
Share on other sites
Advertisement
Since OpenGL is single-threaded you''ll need to do your texture loading in 2 stages. Your main thread should be rendering as normal, while your secondary thread is loading the texture data into memory (but not making and calls to GL - only the main thread can do that). Once a texture has been loaded from disk you need to signal your main thread so that it can make the necessary calls to OpenGl to create the texture, set params, etc.



Iain Hutchison
Programmer, Silicon Dreams
The views expressed here are my own, not those of my employer.

Share this post


Link to post
Share on other sites

  • Advertisement