Without any intended delay, is the code of a fragment-shader run once per frame? If not, how often will the code be executed? (I'm new to shaders: I'm talking about glsl if it makes any difference)
After you bind your program (2 shaders) with
useProgram function, shaders are run at every
You can call those functions at every frame, 1000 times per frame, or once an hour.
You can also examine the "work at the server" during the single
drawElements call. Vertex (or fragment) shader should be run for every vertex (or fragment). It is usually done on massively parallel hardware systems with many cores. Tens, hundreds or even thousands of instances of the shader program can run at the same time. And those systems are in our pockets! :)