View Full Version : OGL state DLL-module dependant?

02-05-2006, 11:23 AM
Just a quick question, didn't find the answer on the net tough, that's why I'm asking here...

Having several already loaded rendering DLLs (which are part of a single renderer providing some sort of an abstarction layer), does the OGL state, like bound VBO buffers etc remain unchanged across the different DLL modules?

Thanks in advance.

02-05-2006, 12:36 PM
State is per thread.

02-05-2006, 01:04 PM
State is per-context!

You can have one state shared among multiple threads (as long as it is only active in one thread at a time) or you can have a context per-thread.

In reguards to the origional question, (if you are not using multiple contexts/threads) any changes to the OpenGL state inside a DLL, will change the state that is accessed by the other DLL's.

02-05-2006, 02:51 PM
Ok that's what I wanted to know thx guys.

02-05-2006, 06:07 PM
sqrt[-1] is correct, of course. I was thinking way ahead, platform specific, and ended up almost in kernel mode before I typed a character. :)

My confusion originated in me upon reading the question suspect OP might have been bitten by some multi-threaded COM stuff, as an OpenGL context is associated with a thread, and only the associated thread can perform operations with it. Assumption, the mother of all...

Mea culpa.