Part of T49042 Also reduced the number of matrix ops. TODO: replace glBegin/glVertex with new immediate mode