How do I grab an image from my EAGLLayer ?

后端 未结 3 1847
温柔的废话
温柔的废话 2021-01-06 21:45

I\'m looking for way to grab the content of my opengl (as UIImage) and then save it into a file. I\'m now giving glReadPixels a try though I\'m not sure I\'m doing the right

3条回答
  •  無奈伤痛
    2021-01-06 22:06

    Look up "Technical Q&A QA1704 OpenGL ES View Snapshot", where Apple gives a worked example, including Nils' "better way" to unflip the image. It gets you to your UIImage, and from there follow Nils for a means of saving as a file.

提交回复
热议问题