next up previous contents index
Next: 2.10 Coordinate Transformations Up: 2 OpenGL Operation Previous: 2.8 Vertex Arrays

2.9 Rectangles

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[2], T v2[2] ) ;

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.



David Blythe
Sat Mar 29 02:23:21 PST 1997