GPUs work exclusively with triangles, lines, and points — all geometry must be decomposed into triangles before drawing
Unlike high-level 2D canvas APIs, a GPU’s drawing primitives are limited to points, lines, and triangles. Triangles dominate because they are always planar, always convex, and rasterize with highly predictable hardware logic. Any shape — a quad, a circle, a mesh — must be decomposed into triangles before the GPU can draw it. This constraint shapes everything: a quad requires two triangles sharing a diagonal edge, a circle is approximated by N thin triangles from a center point. Understanding this is prerequisite to setting up any vertex buffer.
Examples
A square with corners (-0.8,-0.8), (0.8,-0.8), (0.8,0.8), (-0.8,0.8) needs two triangles with 6 vertex entries: [(-0.8,-0.8),(0.8,-0.8),(0.8,0.8)] and [(-0.8,-0.8),(0.8,0.8),(-0.8,0.8)], repeating two shared corners.
Assessment
Why does defining a quad with 4 unique vertices fail for the GPU? Write the 6-element vertex list (XY pairs) for a quad split into two triangles along the diagonal from bottom-left to top-right.