On the client side, we must provide
the following to the shaders:
The projection matrix typically
does not change when rendering a frame.
Therefore, it can be sent once
- The light properties
- The material properties
- The projection, modelview, and
pMainProgram->SetUniform("matrices.projMatrix", pCamera- >GetPerspectiveProjectionMatrix());
However, the modelview matrix (and
therefore the normal matrix) typically change for each object being
rendered. Therefore we must update these
before rendering the objects.