Jump to content
  • Advertisement
Sign in to follow this  
Julian Spillane

Multithreading Device Context...

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

Hey all, First off, I'm sorry if this has been asked before, but I've been searching and racking my brain for awhile now. Anyways, I'm attempting to generate display lists in a separate thread than they're going to be used. I'm doing this so I can encapsulate -all- of my loading code in one thread. Now, I know that I have to use wglShareLists() and all that, but the problem that I'm having is that I don't have a device context for my thread, and therefore no rendering context to pass to wglShareLists(). Any advice on what I can do? Thanks a lot. Best Regards, Julian Spillane

Share this post


Link to post
Share on other sites
Advertisement
you'll have to make a context for the thead [smile]

OpenGL contexts can only exist in one thread at a time, if you need two threads to have access to the hardware at once then you either need (a) two windows, one assigned to each thread or (b) swap the context between threads as needed.

As to how you share this infomation around however is another matter [smile]

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!