0

I want to read pixels from the screen/monitor after the image has been displayed to the user.

MS provides Graphics.CopyFromScreen which apparently:

Performs a bit-block transfer of color data from the screen to the drawing surface of the Graphics.

But is this really true? Does it not read the pixels from the frame buffer?

glReadPixels (doc) reads from the frame buffer - is that before or after the screen has been updated (it doesn't specify)?

Would the "MS" equivalent to glReadPixels be to use DirectX's GetBuffer? (such as the answer provided here)

pookie
  • 3,796
  • 6
  • 49
  • 105
  • Using OpenGL (with context and other stuff) `glReadPixels` reads from the buffer bound to `GL_READ_FRAMEBUFFER`. It happens that the shown window is also bound for reading. So you read pixels after the image is displayed. – Ripi2 Mar 07 '19 at 20:44
  • How do you present the content on the screen? Rendered with OpenGL -> use glReadPixels. Rendered with DirectX -> use directx method. Other method -> depends on which method you are using. – BDL Mar 08 '19 at 08:43

0 Answers0