Does anyone have an example of how to compile a shader, save the shader binary, and use glShaderBinary to later load the shader with iPhone/iOS (OpenGL ES 2.0)?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Why is glClear blocking in OpenGLES?
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
The best place to start is the XCode OpenGL template project, which for some time has included ES 2.0 shaders by default. It also has the distinct advantage of being a very, very simple example.
It's not possible to do this (at least with iOS 4 and below). iOS doesn't support any precompiled binary shaders. If you query OpenGL for the number of binary shader formats it supports, you get back zero.
You're forced to compile the shaders every time you start the app.
(Answered my own question.)