Obtaining remote rendering context

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

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 threads
To 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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.