Added mechanism for automatic update of uniforms.