OpenGL ES: Previewing Changes to a Shader

Preview changes to a shader program during a debug session.

To preview OpenGL ES shader changes
  1. Run the app on an iOS device, and capture a frame.

  2. In the OpenGL call trace, select the OpenGL call you’re interested in.

  3. In an assistant editor jump bar, choose Bound GL Objects > Programs.

  4. From the first segment after the Programs segment in the assistant jump bar, choose the shader you want to modify.

  5. Modify the shader program code, and click Update Program.


Making shader program modifications in a debug session lets you try several changes to find out which ones provide the best results. However, these changes are not reflected in the source code for the shader.

When you click Update Program, the GL objects reflect the effect of the change.

Resume app execution to see the effect of the change in the running app.

Use the OpenGL ES performance analyzer to measure the performance of the modified shader.