IT lexicon › Programming › Primitive restart

Primitive restart

Programming På svenska → Updated: 2026-10-26

A reserved index value that breaks a triangle strip mid-stream and starts a new one, so a single draw call can hold many separate strips.

Triangle strips are compact but continuous — to draw several separate strips in one draw call the stream must know where one ends and the next begins. Primitive restart solves this with a magic index value (0xFFFF or 0xFFFFFFFF) that resets primitive assembly. Introduced in OpenGL 3.1 (2009) via glPrimitiveRestartIndex; Direct3D calls it strip-cut.

The old alternative was degenerate triangles: you repeated a vertex so the in-between triangle had zero area and vanished. It worked but pushed extra vertices through the pipeline. Primitive restart does the same job more cleanly and saves both memory and draw calls when a mesh is thousands of short strips.

← Back to the lexicon