IPhone glShaderBinary

Does anyone have an example of compiling a shader, saving the shader binary, and using glShaderBinary to download the shader later using iPhone / iOS (OpenGL ES 2.0)?

+2
source share
2 answers

This is impossible to do (at least with iOS 4 and below). iOS does not support any precompiled binary shaders. If you request OpenGL for the number of supported binary shader formats, you will get a null value.

You must compile the shaders every time you run the application.

(answered my own question.)

+3
source

The best place to start is the XCode OpenGL template project, which by default included ES 2.0 shaders by default. It also has the clear advantage of being a very, very simple example.

0
source

All Articles