Jump to content
  • Advertisement
Sign in to follow this  

OpenGL multiple threads

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

Hi, I am developing effects for a video editor. I have a situation where within the framework I'm using, every call of the Frameprocessor spawns a new OpenGL thread(i have a global window (handle)created at DLL load, which is valid till application quits). The saving grace is that often the same threadID turns up repeatedly. To handle the unique rendering contexts that need to be created for each threadID, i use a STL map where i store threadIDs and the corresponding contexts. i also need to create textures for each context(tried wglsharelists(), didn't work in a case where the threads are different, works when there are multiple windows/RCs but on only one thread). Now say a texture created has ID 1. For each thread it is bound to have textureID 1. Say when I'm done with the thread, I try to delete the texture, with ID as 1, and it fails. Only when the last thread is released, the texture ID 1 is actually released. which means the textures created on the previous threads are all kept dangling! Can somebody explain the behavior? Is it that I need to release the textures/RC in the reverse order of their creation? thanks in advance, steel

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!