There is a set of GL commands to support efficient specification of rectangles as two corner vertices.
void Rect[sifd] ( T x1, T y1, T x2, T y2 ) ;
void Rect[sifd]v ( T v1, T v2 ) ;
Each command takes either four arguments organized as two consecutive pairs of coordinates, or two pointers to arrays each of which contains an x value followed by a y value. The effect of the Rect command
is exactly the same as the following sequence of commands:
The appropriate Vertex2 command would be invoked depending on which of the Rect commands is issued.