obtaining full desktop screenshot from the GPU

梦想与她 提交于 2019-11-29 03:55:24

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!