Now that the gl_*Matrix is deprecated we need to supply the shaders with our own matrices via uniforms. So far so good.
Imagine I have the following part of a vertex shader:
Code :... uniform mat4 my_projection_mat; uniform mat4 my_modelview_mat; ... gl_Position = (my_projection_mat * my_modelview_mat) * my_vertex; ...
My question is: Will the driver perform the (my_projection_mat * my_modelview_mat) calculation for every vertex? Or it will understand that this calculation needs to be done only once?