| Main Menu | TOC | Previous | Next | Lecture Start |
OpenGL C Quick ReferenceGLvoid glBegin( GLenum mode ) GLvoid glEnd( GLvoid )
Delimit the vertices of a primitive or a group of like primitives. Ten
symbolic constants are accepted as the mode: GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP, GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS, GL_QUAD_STRIP,
and GL_POLYGON. GLvoid glColor3[bsidf]( TYPE red, TYPE green, TYPE blue ) GLvoid glColor3u[bsi]( TYPE red, TYPE green, TYPE blue ) GLvoid glColor4[bsidf]( TYPE red, TYPE green, TYPE blue, TYPE alpha ) GLvoid glColor4u[bsi]( TYPE red, TYPE green, TYPE blue, TYPE alpha ) GLvoid glColor[34][bsidf]v( const TYPE *v ) GLvoid glColor[34]u[bsi]v( const TYPE *v )
Sets the current color using red, green, blue and alpha values. The
coordinate type must match the command; byte (b), short (s), integer
(i), double (d), float (f), unsigned byte (ub), unsigned short (ub) or
unsigned integer (ui). GLvoid glRect[sifd]( TYPE x1, TYPE y1, TYPE x2, TYPE y2 ) GLvoid glRect[sifd]v( const TYPE *v1, const TYPE *v2 )
Specify two vertices that define opposite corners of a filled
rectangle. The coordinate type must match the command; byte (b), short
(s), integer (i), double (d), or float (f). GLvoid glShadeModel( Glenum mode )
Select flat or smooth shading. Accepted values for mode are: GL_FLAT,
and GL_SMOOTH (default). GLvoid glVertex2[bsidf]( TYPE x, TYPE y ) GLvoid glVertex3[bsidf]( TYPE x, TYPE y, TYPE z ) GLvoid glVertex4[bsidf]( TYPE x, TYPE y, TYPE z, TYPE w ) GLvoid glVertex[234][bsidf]v( const TYPE *v ) Specify a vertex using 2, 3, or 4 coordinates. The coordinate type must match the command; byte (b), short (s), integer (i), double (d), or float (f). |
| Main Menu | TOC | Previous | Next | Lecture Start |