# 1 Is there a limit on the number / size of shader programs that can be compiled and available simultaneously in OpenGL ES 2.0 (iPhone / iPad)?
# 2 Is there any performance overhead for switching between programs in the middle of the aisle, for example, if I have to display 100 triangles, 50 with shader1, 50 with shader2, will I get performance hits in any cases of using this? For example, can it be slower than alternating programs for each triangle, or if it will execute the package faster and do all 50 of shader1, then all 50 shaders2? I’m probably asking if there is some kind of internal context switch, or if the OpenGL ES libraries just determine which shader address of the program on the card to execute, and it doesn’t matter if I indicate that each triangle is different.
source
share