Eliminate a few OpenGL redundant calls.