NAME
fglRectd, fglRectf, fglRecti, fglRects, fglRectdv,
fglRectfv, fglRectiv, fglRectsv - draw a rectangle
FORTRAN SPECIFICATION
SUBROUTINE fglRectd( REAL*8 x1,
REAL*8 y1,
REAL*8 x2,
REAL*8 y2 )
SUBROUTINE fglRectf( REAL*4 x1,
REAL*4 y1,
REAL*4 x2,
REAL*4 y2 )
SUBROUTINE fglRecti( INTEGER*4 x1,
INTEGER*4 y1,
INTEGER*4 x2,
INTEGER*4 y2 )
SUBROUTINE fglRects( INTEGER*2 x1,
INTEGER*2 y1,
INTEGER*2 x2,
INTEGER*2 y2 )
PARAMETERS
x1, y1 Specify one vertex of a rectangle.
x2, y2 Specify the opposite vertex of the rectangle.
FORTRAN SPECIFICATION
SUBROUTINE fglRectdv( CHARACTER*8 v1,
CHARACTER*8 v2 )
SUBROUTINE fglRectfv( CHARACTER*8 v1,
CHARACTER*8 v2 )
SUBROUTINE fglRectiv( CHARACTER*8 v1,
CHARACTER*8 v2 )
SUBROUTINE fglRectsv( CHARACTER*8 v1,
CHARACTER*8 v2 )
PARAMETERS
v1 Specifies a pointer to one vertex of a rectangle.
v2 Specifies a pointer to the opposite vertex of the
rectangle.
DESCRIPTION
fglRect 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.
fglRect(x1, y1, x2, y2) is exactly equivalent to the
following sequence: glBegin(GL_POLYGON); glVertex2(x1, y1);
glVertex2(x2, y1); glVertex2(x2, y2); glVertex2(x1, y2);
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
GL_INVALID_OPERATION is generated if fglRect is executed
between the execution of fglBegin and the corresponding
execution of fglEnd.
SEE ALSO
fglBegin, fglVertex