Optimize updating of modelview matrix.