Skip to content

Easy way to render a CIImage in a GLKView using GLKit

When I first started playing around with Core Image I struggled to find helpful documentation to render an image using OpenGL ES. This post demonstrates the easiest way to get up and running with a GLKView.

You can find the playground project here.

Render a CIImage using GLKView

The resulting output looks like this:

CIImage rendered in GLKView

Published iniOS

2 Comments

  1. JmB JmB

    Nice work.
    Hard coding the view coordinates makes it tough to view on different devices. Maybe use Class Sizes and Constraints instead? I have a UISlider that changes a CIImage in real time, but the CIImage origin x and y is the same as the GLKView, so the pic is in the bottom left corner. I would rather center it, or have the view size to fit. Anyway, thanks for taking the time to post this….not a lot of info out there. Maybe Apple should update FunHouse. ;o)

  2. JmB JmB

    Also, a GLKView is designed for animation. Just use UIImageView to display an image. My UISlider adjusts a CIFilter in realtime in my GLKView. Again, they are designed for animation….NOT displaying images.

Leave a Reply