Minimizing the number of OpenGL calls