obtaining full desktop screenshot from the GPU

后端 未结 2 1573
孤街浪徒
孤街浪徒 2020-12-16 17:39

I have been using the Windows API\'s BitBlt function to perform the screen grab.

There are many drawbacks however:

  1. DWM and Aero cause a
相关标签:
2条回答
  • 2020-12-16 18:03

    OpenGL can only read the context framebuffer (a window), and any framebuffers or pbuffers you have created. OpenGL cannot touch the desktop or any other window.

    0 讨论(0)
  • 2020-12-16 18:15

    This is an interesting question. Unfortunately I don't think this is really supported. I have found reports of some level of success with creating a full screen invisible window and reading the pixel data with glReadPixels:

    http://www.virtualdub.org/blog/pivot/entry.php?id=142

    http://www.opentk.com/node/2430

    However, I believe the behavior when doing this is undefined and will only work on specific hardware/OS configurations.

    0 讨论(0)
提交回复
热议问题