Why gl_Color is not a built-in variable for the fragment shader?
opengl
Solution
That is because the OpenGL pipeline uses `gl_Position` for several tasks. The manual says: "The value written to gl_Position will be used by primitive assembly, clipping, culling and other fixed functionality operations, if present, that operate on primitives after vertex processing has occurred."
In contrast, the pipeline logic does not depend on the final pixel color.
Problem
The vertex shader is expected to output vertices positions in clip space: Vertex shaders, as the name implies, operate on vertices. Specifically, each invocation of a vertex shader operates on a single vertex. These shaders must output, among any other user-defined outputs, a clip-space position for that vertex. (source: Learning Modern 3D Graphics Programming, by Jason L. McKesson) It has a built-in variable named `gl_Position` for that. Similarly, the fragment shader is expected to output colors: A fragment shader is used to compute the output color(s) of a fragment. [...] After the fragment shader executes, the fragment output color is written to the output image. (source: Learning Modern 3D Graphics Programming, by Jason L. McKesson) but there is no `gl_Color` built-in variable defined for that as stated here: opengl44-quick-reference-card.pdf Why that (apparent) inconsistency in the OpenGL API?