An insight into the OpenGL pipeline
We talk about pipeline because the graphics data goes through a series of steps in which it is transformed. The following diagram shows a simplified representation of the OpenGL ES 2 pipeline:
Vertex Processing: An input mesh of vertices, given as a vertex buffer object or a vertex array, is transformed vertex by vertex in a vertex shader. The vertex shader can, for example, move or rotate single vertices, project them onto the screen, adapt texture coordinates, compute lighting, and so on. It generates an output vertex that can be processed further in the pipe.
Primitive Assembly: Individual vertices are connected together into triangles, points, lines, and so on. More connection information is specified by the client code when the draw call is sent. It can take the form of an index buffer (each index points to a vertex through its rank) or a predefined rule, such as stripping or fanning. Transformations such as back face culling or clipping are done...