GLRECT(3G) | GLRECT(3G) |
glRect(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.