

I also shuffle the order to the glTexCoord() and glNormal() which shouldn't change the drawing result. In the latter form, I basically say I want to apply a single color to everything. Typically driver writers try to optimize everything they can, but optimizing glBegin()/glEnd() is actually tricky because there are so many different permutations available to describe objects.

In addition, OpenGL driver writers have a much bigger job because they have to support many more things. Having so many redundant ways to draw is confusing. With regards to simplicity, there are many ways to draw in OpenGL that have been added through the years. This overhead is non-trivial for objects with a lot of data. In addition, glBegin()/glEnd() style code creates a lot of function call overhead because you call a separate function for every vertex, color, texture coordinate, and normal. Hence drawing in immediate mode is slow because you are waiting to send large amounts of data through the system bus to the GPU. In current modern architectures, both GPUs and CPUs are extremely powerful, but main system memory and the system bus are comparatively slow and create huge bottlenecks when trying to send data between them. In immediate mode drawing, the system is essentially dispatching all drawing commands on demand from the main system (which is CPU+system RAM+system bus) to the graphics card (GPU). The first problem is coined 'immediate mode' drawing. In performance, the glBegin()/glEnd() technique is very slow. The two main reasons for removing these functions are performance and simplicity. But to shock of many people, these functions have been excluded from OpenGL ES, and there is pressure to remove these functions from future versions of OpenGL proper. When most people first learn OpenGL, they are taught using glBegin() and glEnd(). Since I've gotten multiple questions, I thought I would post a very simple tutorial for VBOs.

This is mostly due to the interest in iPhone development which uses OpenGL ES 1.1, though I have received a few desktop performance questions as well. ** * Created by Kalidoss on 18/07/16.Recently, I have been getting a lot of similar questions about how to draw geometry in OpenGL without the use of glBegin()/glEnd().
