Rendering CIImage into OpenGL ES 2.0 texture on iOS
Asked Answered
G

1

6

Does someone know how to render a CIImage directly into an OpenGL ES 2.0 texture via drawImage:inRect:fromRect: from an EAGL CIContext on iOS? Rendering via a normal CIContext via createCGImage:fromRect: then loading the image via GLKTextureLoader is too slow for me.

Gynecocracy answered 24/10, 2012 at 17:27 Comment(0)
B
6

There is a Wwdc session that covers exactly this. 2012 Session 511 (near the end). Basically what you want to do is:

-Create output texture

-Make output texture the target of a framebuffer

-bind the texture framebuffer as output instead of the screen

-Now use drawImage: inRect: fromRect: to write directly to the texture.

Brumley answered 13/3, 2013 at 14:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.