OpenGL C bindings library: libGL.a
void glRectd(GLdouble X1, GLdouble Y1, GLdouble X2, GLdouble Y2)
void glRectf(GLfloat X1, GLfloat Y1, GLfloat X2, GLfloat Y2)
void glRecti(GLint X1, GLint Y1, GLint X2, GLint Y2)
void glRects(GLshort X1, GLshort Y1, GLshort X2, GLshort Y2)
void glRectdv(const GLdouble *V1, const GLdouble *V2)
void glRectfv(const GLfloat *V1, const GLfloat *V2)
void glRectiv(const GLint *V1, const GLint *V2)
void glRectsv(const GLshort *V1, const GLshort *V2)
The glRect subroutine 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 equivalent to the following sequence:
glBegin(GL_POLYGON); glVertex2(X1, Y1); glVertex2(X2, Y1); glVertex2(X2, Y2); glVertex2(X1, Y2); glEnd();
Note: If the second vertex is above and to the right of the first vertex, the rectangle is constructed with a counterclockwise winding.
GL_INVALID_OPERATION | The glRect subroutine is called between a call to glBegin and the corresponding call to glEnd. |
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glBegin or glEnd subroutine, glVertex subroutine.