From Cradle to Viewport

Before any pixels appear on the screen, you geometric data must pass through an obstacle course of manipulations and challenges called the graphics pipeline. The pipeline roughly follows these stages:

  1. A geometric model is loaded or generated by your application and uploaded to the GPU in VBOs.
  2. The application asks the GPU to draw the model.
  3. The vertex shader transforms the model, passing it through a series of coordinate systems that are convenient for performing various operations, like lighting.
  4. Primitives that reside or extend offscreen are clipped so only their visible portions continue on through the pipeline.
  5. The GPU transforms the vertices into pixel coordinates within the viewport.
  6. The fragment shader decides the colors of the fragments between the surviving vertices.
  7. Fragments are tested to see if their colors should be written to the framebuffer. One typical test rejects any fragments that are behind fragments nearer to the viewer.
  8. Fragment colors either replace or combine with colors already written to the framebuffer.

Read on to learn more about these stages.