Check for Shader Program Errors When Debugging Once you’ve created all your shaders, the app can efficiently switch between them by calling glUseProgram. Compile, link, and validate your programs when your app is initialized. Compile and Link Shaders During InitializationĬreating a shader program is an expensive operation compared to other OpenGL ES state changes.
Shaders provide great flexibility, but they can also be a significant bottleneck if you perform too many calculations or perform them inefficiently.
To create high-performance code on GPUs, use the Metal framework instead.