Jump to content
  • Advertisement

Archived

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

Poontardis

OpenGL [OpenGL] - Binding textures at runtime

This topic is 6585 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

Is there any way to bind a texture at runtime without stalling the rendering cycle? I''ve tried binding the texture in a seperate thread - bad idea. OpenGL doesn''t seem to like this. If I have the glBindTexture in the main thread then it causes a slight (but definitely noticeable) stall in frame rate. I''m guessing this means that the function call doesn''t return until the texture is in memory and properly bound. So is there anyway of forcing it to return immediately and leave you with the task of avoiding conflicts and error yourself? Cheers for any help.

Share this post


Link to post
Share on other sites
Advertisement
What happens when you try to bind a texture in a different thread? Are you trying to do before you need it, or when you need it?

Paul.

Share this post


Link to post
Share on other sites
Ummmm.....

...it''s been a while since I did it actually, but I''m not daft enough ( I think ) to try using the texture before it''s bound.

I probably waited for the texture binding thread to terminate before trying to use the texture.

I don''t think OpenGL is multithreaded safe (on a single threaded card anyway). If I remember correctly - it screwed up royally and wasn''t a happy bunny.

I''ll give it another try, this afternoon or tomorrow morning and form a detailed report of the results.

More later....

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!