Hello, I hope you’re all doing well.
I’m trying to understand how OpenGL Graphics pipeline works but some steps seems to be a bit confusing.
I don’t get the purpose of the primitive assembly step, I mean I know what happens at this stage: Primitives are divided into a sequence of individual base primitives ( points, lines, triangles) but why it has to happen before rasterization and after Vertex Post processing stages.
Why can’t we just move from Vertex Post Processing to rasterization ?
Is it because we can’t rasterize, for example, a polygon unless it is divided into triangles or a basic primitive in general ? But why exactly ?
Also, I kept searching and I found this:
For example, a Geometry Shader operates on each input base primitive in the primitive sequence. Therefore, a form of primitive assembly must happen before the GS can execute. [https://www.khronos.org/opengl/wiki/Primitive_Assembly]
However the stage of primitive assembly takes place after the geometry shader according to this pipeline:
Isn’t it contradictory ?
I found another pipeline version in some OpenGL tutorial which is different from the one above:
I know that tesselation is an optional stage but some other stages are missing like Vertex Post-processing which is an important one.
So I kinda don’t really know which pipeline I should adapt.
I really would appreciate it if you help me a bit, I’ve reading a lot about OpenGL pipeline and it’s a bit difficult to understand exactly how OpenGL works.
Thank you all.