Jump to content
  • Advertisement
Sign in to follow this  
Stazh

OpenGL Problem creating textures from another thread

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

Hy there. I have a problem with creating textures (using glTexImage2D and gluBuild2DMipmaps) from "loading" thread. I use this thread for loading purposes (doh :D ) and when i call these functions for creatig textures in OpenGL it does nothing. When i try to create textures from my main thread all works fine. Does some one know how to fix this. Btw this is my first post, so, hy everyone :D

Share this post


Link to post
Share on other sites
Advertisement
You can't tinker with OpenGL from multiple threads at the same time. You can either 1) make the GL context 'current' (exact implementation varies depending on platform) while loading your texture, but that can be tricky to do correctly and will likely stall your rendering. Or 2) do the bulk of the loading in a separate thread but hand off the actual texture creation and data upload to the main thread.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!