vroad's picture

GL.ReadPixels with invisible window

I want to get image from GLControl which is not shown.

GL.ReadPixels fails when GLControl is covered by other window.
Rectangle which is covered by other window is filled with black.
When Window is minimized, GL.ReadPixels do nothing.
(However, GL.GetError always returns "Errorcode.NoError".)

How can I do GL.ReadPixels with invisible Window?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

According to the OpenGL specs, the contents of an invisible or an obscured window are undefined. You will need to create a Framebuffer Object and render to that in order to get correct results.

Check the documentation on framebuffer objects for more information.

vroad's picture

Thank you.I use Frame Buffer Object instead..