Skip to main content
gamedev.net
🔒 Locked

Multithreading Device Context...

Started by Julian Spillane Aug 10, 2005 at 6:46 PM 1 replies 1k views
Original Post
Julian Spillane
Julian Spillane
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
_the_phantom_
_the_phantom_
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]
Julian Spillane
Julian Spillane
Damn...

Thought as much. Oh well, I'll either have to be creative in solving this, or just make a hack solution.

Thanks a lot, though! :D

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.