Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use custom shaders together with GLKit

Tags:

ios5

shader

glkit

I keep reading how wonderfully easy it is to work with GLKit and your own custom shaders. But, so far, I have failed to find any information on how to actually do it. How can I take my own shader and "plug it in" into existing GLKit project?

like image 310
Błażej Czapp Avatar asked Apr 10 '12 23:04

Błażej Czapp


1 Answers

Well, you can look at this blog, which uses GLKit to build a basic OpenGL ES 2.0 application. There's also links to other blogs if you're looking to dig more into it:

GLKit + OpenGL ES 2.0 + iOS5 Programming blog

The only thing it doesn't cover is GLKBaseEffect, but if you want to build custom shaders like you said, you definitely don't want to use it anyway.

GLKit provides 4 basic things:

  1. A math library (Matrices, verctors...)
  2. A View/Controller combo made especially for drawing OpenGL content
  3. A texture loader class (GLKTextureLoader)
  4. GLKBaseEffect, which mimics OpenGL 1.0's fixed pipeline
like image 132
Gabriel G. Roy Avatar answered Sep 29 '22 13:09

Gabriel G. Roy