Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering CIImage into OpenGL ES 2.0 texture on iOS

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.

like image 429
imLanky Avatar asked Oct 24 '12 17:10

imLanky


1 Answers

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.

like image 196
FreaknBigPanda Avatar answered Nov 01 '22 07:11

FreaknBigPanda