简体   繁体   中英

iOS GLKit post processing?

I have a game running using glKit, and would like to add some post processing effects using a shader after each frame has rendered.

Is it possible to do this under glKit?

This is possible.

You will need to create your own offscreen framebuffer object and associated texture. Then call [GLKView bindDrawable] to point further rendering at GLKView's framebuffer. You can then perform more rendering, including reading from the texture that you just previously rendered to.

The framebuffer API is all standard OpenGL ES calls, which you can read about in any OpenGL ES 2.0 book. Apple also has some iOS-specific documentation at http://developer.apple.com/library/ios/ipad/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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