Basic primitives (points, lines, triangles quads and polygons) in OpenGL can be drawn using the following algorithm: glBegin(mode); glColor3f(float,float,float); // set the current color glVertex3f(float,float,float); // draw a vertex glVertex3f(float,float,float); // draw another vertex ... glEnd(); where mode is one of the available OpenGL scheme: (image taken here) |
|
PREVIOUS: 01 - INRODUCTION |
NEXT: 02 - TRANSFORMATIONS |