NAME
glRectd, glRectf, glRecti, glRects, glRectdv, glRectfv, glRectiv, glRectsv
- draw a rectangle
C SPECIFICATION
void ggllRReeccttdd(
GLdouble _x_1,
GLdouble _y_1,
GLdouble _x_2,
GLdouble _y_2 )
void ggllRReeccttff(
GLfloat _x_1,
GLfloat _y_1,
GLfloat _x_2,
GLfloat _y_2 )
void ggllRReeccttii(
GLint _x_1,
GLint _y_1,
GLint _x_2,
GLint _y_2 )
void ggllRReeccttss(
GLshort _x_1,
GLshort _y_1,
GLshort _x_2,
GLshort _y_2 )
PARAMETERS
-
_x_1, _y_1
-
Specify one vertex of a rectangle.
-
_x_2, _y_2
-
Specify the opposite vertex of the rectangle.
C SPECIFICATION
void ggllRReeccttddvv(
const GLdouble _*_v_1,
const GLdouble _*_v_2 )
void ggllRReeccttffvv(
const GLfloat _*_v_1,
const GLfloat _*_v_2 )
void ggllRReeccttiivv(
const GLint _*_v_1,
const GLint _*_v_2 )
void ggllRReeccttssvv(
const GLshort _*_v_1,
const GLshort _*_v_2 )
PARAMETERS
-
_v_1
-
Specifies a pointer to one vertex of a rectangle.
-
_v_2
-
Specifies a pointer to the opposite vertex of the rectangle.
DESCRIPTION
ggllRReecctt 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.
ggllRReecctt(_x_1, _y_1, _x_2, _y_2)
is exactly equivalent to the following sequence:
glBegin(GGLL__PPOOLLYYGGOONN);
glVertex2(_x_1, _y_1);
glVertex2(_x_2, _y_1);
glVertex2(_x_2, _y_2);
glVertex2(_x_1, _y_2);
glEnd();
Note that if the second vertex is above and to the right of the first vertex,
the rectangle is constructed with a counterclockwise winding.
ERRORS
GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllRReecctt
is executed between the execution of ggllBBeeggiinn
and the corresponding execution of ggllEEnndd.
SEE ALSO
ggllBBeeggiinn((33GG)),
ggllVVeerrtteexx((33GG))