## Reference Pages †## Coordinate System †## void glMatrixMode(GLenum mode); †- Initial Parameter
GL_MODELVIEW - Parameters
- GL_MODELVIEW:
Applies subsequent matrix operations to the modelview matrix stack. - GL_PROJECTION:
Applies subsequent matrix operations to the projection matrix stack. - GL_TEXTURE
Applies subsequent matrix operations to the texture matrix stack. - GL_COLOR
Applies subsequent matrix operations to the color matrix stack. - Description
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(); †- Description
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); †- Parameters
- left, right
Specify the coordinates for the left and right vertical clipping planes. - bottom, top
Specify the coordinates for the bottom and top horizontal clipping planes. ## void glRasterPos(x, y); †- Functions
- glRasterPos2s(GLshort x, GLshort y);
- glRasterPos2i(GLint x, GLint y);
- glRasterPos2f(GLfloat x, GLfloat y);
- glRasterPos2d(GLdouble x, GLdouble y);
- glRasterPos3s(GLshort x, GLshort y, GLshort z);
- glRasterPos3i(GLint x, GLint y, GLint z);
- glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);
- glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);
- glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);
- glRasterPos4i(GLint x, GLint y, GLint z, GLint w);
- glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
- Parameters
- x, y, z, w
Specify the x, y, z, and w object coordinates (if present) for the raster position. ## Characters †## void glutBitmapCharacter(void *font, int character); †- Description
glutBitmapCharacter renders a bitmap character using OpenGL. - Parameters
- GLUT_BITMAP_8_BY_13
- GLUT_BITMAP_9_BY_15
- GLUT_BITMAP_TIMES_ROMAN_10
- GLUT_BITMAP_TIMES_ROMAN_24
- GLUT_BITMAP_HELVETICA_10
- GLUT_BITMAP_HELVETICA_12
- GLUT_BITMAP_HELVETICA_18
## Initialization †## void glClear(GLbitfield mask); †- Description
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. - Parameters
- GL_COLOR_BUFFER_BIT
Indicates the buffers currently enabled for color writing. - GL_DEPTH_BUFFER_BIT
Indicates the depth buffer. - GL_ACCUM_BUFFER_BIT
Indicates the accumulation buffer. - GL_STENCIL_BUFFER_BIT
Indicates the stencil buffer. ## void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf appha); †- Description
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. - Parameters
- red, green, blue, alpha
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); †- Parameters
- red, green, blue
Specify new red, green, and blue values for the current color. - alpha
Specifies a new alpha value for the current color. Included only in the four-argument glColor4 commands. ## void glBegin(GLenum mode); / void glEnd(); †- Description
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. - Parameters
- GL_POINTS
Treats each vertex as a single point. Vertex n defines point n. N points are drawn. - GL_LINES
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. - GL_LINE_STRIP
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. - GL_LINE_LOOP
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. - GL_TRIANGLES
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. - GL_TRIANGLE_STRIP
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. - GL_TRIANGLE_FAN
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. - GL_QUADS
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. - GL_QUAD_STRIP
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. - GL_POLYGON
Draws a single, convex polygon. Vertices 1 through N define this polygon. ## void glVertex(); †- Functions
- glVertex2s(GLshort x, GLshort y);
- glVertex2i(GLint x, GLint y);
- glVertex2f(GLfloat x, GLfloat y);
- glVertex2d(GLdouble x, GLdouble y);
- glVertex3s(GLshort x, GLshort y, GLshort z);
- glVertex3i(GLint x, GLint y, GLint z);
- glVertex3f(GLfloat x, GLfloat y, GLfloat z);
- glVertex3d(GLdouble x, GLdouble y, GLdouble z);
- glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);
- glVertex4i(GLint x, GLint y, GLint z, GLint w);
- glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
- Parameters
- x, y, z, w
Specify x, y, z, and w coordinates of a vertex. Not all parameters are present in all forms of the command. ## void glRect(); †- Description
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. - void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
- Parameters
- x1, y1
Specify one vertex of a rectangle. - x2, y2
Specify the opposite vertex of the rectangle. - void glRectdv(const GLdouble v1, const GLdouble v2);
- Parameters
- v1
Specifies a pointer to one vertex of a rectangle. - v2
Specifies a pointer to the opposite vertex of the rectangle. ## void glFlush(); †- Description
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); †- Parameters
- size
Specifies the diameter of rasterized points. The initial value is 1. |

Last-modified: 2013-08-10 (土) 01:51:37 (3706d)