Reference Pages †Coordinate System †void glMatrixMode(GLenum mode); †
GL_MODELVIEW
Applies subsequent matrix operations to the modelview matrix stack.
Applies subsequent matrix operations to the projection matrix stack.
Applies subsequent matrix operations to the texture matrix stack.
Applies subsequent matrix operations to the color matrix stack.
Specifies which matrix stack is the target for subsequent matrix operations. Three values are accepted: GL_MODELVIEW, GL_PROJECTION, and GL_TEXTURE. The initial value is GL_MODELVIEW. Additionally, if the ARB_imaging extension is supported, GL_COLOR is also accepted. void glLoadIdentity(); †
glLoadIdentity replaces the current matrix with the identity matrix. It is semantically equivalent to calling glLoadMatrix with the identity matrix void gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); †
Specify the coordinates for the left and right vertical clipping planes.
Specify the coordinates for the bottom and top horizontal clipping planes. void glRasterPos(x, y); †
Specify the x, y, z, and w object coordinates (if present) for the raster position. Characters †void glutBitmapCharacter(void *font, int character); †
glutBitmapCharacter renders a bitmap character using OpenGL.
Initialization †void glClear(GLbitfield mask); †
glClear sets the bitplane area of the window to values previously selected by glClearColor, glClearIndex, glClearDepth, glClearStencil, and glClearAccum. Multiple color buffers can be cleared simultaneously by selecting more than one buffer at a time using glDrawBuffer.
Indicates the buffers currently enabled for color writing.
Indicates the depth buffer.
Indicates the accumulation buffer.
Indicates the stencil buffer. void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf appha); †
glClearColor specifies the red, green, blue, and alpha values used by glClear to clear the color buffers. Values specified by glClearColor are clamped to the range 0 1.
Specify the red, green, blue, and alpha values used when the color buffers are cleared. The initial values are all 0. Display Function †void glColor3f(GLfloat red, GLfloat green, GLfloat blue); †
Specify new red, green, and blue values for the current color.
Specifies a new alpha value for the current color. Included only in the four-argument glColor4 commands. void glBegin(GLenum mode); / void glEnd(); †
glBegin and glEnd delimit the vertices that define a primitive or a group of like primitives. glBegin accepts a single argument that specifies in which of ten ways the vertices are interpreted. Taking n as an integer count starting at one, and N as the total number of vertices specified, the interpretations are as the following parameters.
Treats each vertex as a single point. Vertex n defines point n. N points are drawn.
Treats each pair of vertices as an independent line segment. Vertices 2 â?¢ n - 1 and 2 â?¢ n define line n. N 2 lines are drawn.
Draws a connected group of line segments from the first vertex to the last. Vertices n and n + 1 define line n. N - 1 lines are drawn.
Draws a connected group of line segments from the first vertex to the last, then back to the first. Vertices n and n + 1 define line n. The last line, however, is defined by vertices N and 1 . N lines are drawn.
Treats each triplet of vertices as an independent triangle. Vertices 3 â?¢ n - 2 , 3 â?¢ n - 1 , and 3 â?¢ n define triangle n. N 3 triangles are drawn.
Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. For odd n, vertices n, n + 1 , and n + 2 define triangle n. For even n, vertices n + 1 , n, and n + 2 define triangle n. N - 2 triangles are drawn.
Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. Vertices 1 , n + 1 , and n + 2 define triangle n. N - 2 triangles are drawn.
Treats each group of four vertices as an independent quadrilateral. Vertices 4 â?¢ n - 3 , 4 â?¢ n - 2 , 4 â?¢ n - 1 , and 4 â?¢ n define quadrilateral n. N 4 quadrilaterals are drawn.
Draws a connected group of quadrilaterals. One quadrilateral is defined for each pair of vertices presented after the first pair. Vertices 2 â?¢ n - 1 , 2 â?¢ n , 2 â?¢ n + 2 , and 2 â?¢ n + 1 define quadrilateral n. N 2 - 1 quadrilaterals are drawn. Note that the order in which vertices are used to construct a quadrilateral from strip data is different from that used with independent data.
Draws a single, convex polygon. Vertices 1 through N define this polygon. void glVertex(); †
Specify x, y, z, and w coordinates of a vertex. Not all parameters are present in all forms of the command. void glRect(); †
glRect 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. Note that if the second vertex is above and to the right of the first vertex, the rectangle is constructed with a counterclockwise winding.
Specify one vertex of a rectangle.
Specify the opposite vertex of the rectangle.
Specifies a pointer to one vertex of a rectangle.
Specifies a pointer to the opposite vertex of the rectangle. void glFlush(); †
Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. glFlush empties all of these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering engine. Though this execution may not be completed in any particular time period, it does complete in finite time. void glPointSize(GLfloat size); †
Specifies the diameter of rasterized points. The initial value is 1. |