简体   繁体   English

OpenGLScreenSnapshot在Mac OS X 10.7 - Lion中不起作用

[英]OpenGLScreenSnapshot doesn't work in Mac OS X 10.7 - Lion

I've been writing a program based on the ScreenSnapshot example from apple: http://developer.apple.com/library/mac/#samplecode/OpenGLScreenSnapshot/Introduction/Intro.html and after upgrading from Snow Leopard to Lion my program stopped working. 我一直在编写一个基于Apple的ScreenSnapshot示例的程序: http//developer.apple.com/library/mac/#samplecode/OpenGLScreenSnapshot/Introduction/Intro.html ,从Snow Leopard升级到Lion后我的程序停止了工作。 When I checked the example I realized it is not working either. 当我检查这个例子时,我意识到它也没有用。 For some reason glReadPixels function raises the GL_INVALID_FRAMEBUFFER_OPERATION_EXT error (0x0506). 由于某种原因,glReadPixels函数会引发GL_INVALID_FRAMEBUFFER_OPERATION_EXT错误(0x0506)。

I have reinstalled developer's tools but no luck. 我重新安装了开发人员的工具,但没有运气。 Has anyone made any progress with this issue? 有没有人在这个问题上取得任何进展? Any pointers will be greatly appreciated. 任何指针将不胜感激。

An updated version was posted a few days ago, see this new sample code called ScreenSnapshot . 几天前发布了更新版本,请参阅名为ScreenSnapshot的新示例代码 There's now a dedicated fonction CGDisplayCreateImage . 现在有一个专门的功能CGDisplayCreateImage There's even an accompanying technical Q&A . 甚至还有随附的技术问答

So, a more général answer: follow Apple's document révisions regularly. 所以,一个更为全面的答案:定期关注Apple的文件。 (Sorry for extraneous accents over é's or fonctions... somehow Lion's spell checker wants to be in French mode.. grr...) (对不起é或者fonctions的无关重音......不知何故Lion的拼写检查员想要处于法语模式...... grr ...)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM