PDA

View Full Version : Obtaining remote rendering context



MattFranklin
02-12-2004, 06:54 AM
Does anyone know if it is possible to obtain the rendering contexts that are associated with a window.

I am using a library that handles all the low level OpenGL for my app, but I want to get hold of the pixel information from the screen buffer if possible.

I know that you aren't supposed to share rendering contexts between threads but I am only trying to read the data using functionn such as glReadPixels().

I have a screen grab solution that will suffice but I really would like to obtain the depth buffer information.

Cheers,

Matt

Obli
02-12-2004, 09:18 AM
Originally posted by MattFranklin:
Does anyone know if it is possible to obtain the rendering contexts that are associated with a window ... I want to get hold of the pixel information from the screen buffer if possible. I am pretty sure win32 does not have any function to get say, the GLRC from a window handle. If you don't have access to the source of the app you want to get info about, then I guess you're out of luck.
Originally posted by MattFranklin:
I know that you aren't supposed to share rendering contexts between threadsTo tell the truth you are you can't have a GLRC current to multiple threads but you can have it shared. Lots of extensions provide extra details for this case.
Originally posted by MattFranklin:
...I really would like to obtain the depth buffer information.
I'm not sure this can be done in GL right now since this information is hold in a OS-specific structure, for windows the so called "pixel format". It's an information which is well away from GL from itself and more specific to its context, which GL does not manage and leaves to OS-specific facilities.