如何使用 glReadPixels 从 EAGLView 的帧缓冲区内容高效创建 CGImageRef?也许我可以“直接渲染到纹理”?
我对 OpenGL ES 比较陌生,因此非常感谢您的帮助!
最佳答案
函数glReadPixels
非常昂贵......如果你想渲染到纹理,你可以看看:
- iPhone post-processing with a single FBO with Opengl ES 2.0?
- Rendering to texture on iOS OpenGL ES—works on simulator, but not on device
- Writing to then reading from an offscreen FBO on iPhone; works on simulator but not on device? (答案在问题末尾...)
- http://developer.apple.com/library/ios/#qa/qa1704/_index.html
- http://www.visualnewt.com/OpenGL/learning_iphones_opengl_es/
- http://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml
有关 iOS 上 OpenGL ES 的引用,请参阅 http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Glossary/Glossary.html
关于ios - 来自 OpenGL ES 帧缓冲区的 CGImageRef (iOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7368048/