glRect supports efficient specification of rectangles as two corner points. Each rectangle command takes four arguments, organized either as two consecutive pairs of x y coordinates or as two pointers to arrays, each containing an x y pair. The resulting rectangle is defined in the z = 0 plane. glRect ( x1, y1, x2, y2 ) is exactly equivalent to the following sequence:
Copyright 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
glRect: man2/glRect.xml
glRect supports efficient specification of rectangles as two corner points. Each rectangle command takes four arguments, organized either as two consecutive pairs of x y coordinates or as two pointers to arrays, each containing an x y pair. The resulting rectangle is defined in the z = 0 plane. glRect ( x1, y1, x2, y2 ) is exactly equivalent to the following sequence:
Note that if the second vertex is above and to the right of the first vertex, the rectangle is constructed with a counterclockwise winding.