Anatomy of a WebGL App

  1. Create a canvas element.
  2. Obtain a drawing context for the canvas.
  3. Initialize the viewport.
  4. Create one or more buffers containing the data to be rendered (typically vertices).
  5. Create one or more matrices to define the transformation from vertex buffers to screen space.
  6. Create one or more shaders to implement the drawing algorithm.
  7. Initialize the shaders with Draw.