13.016 Introduction to Geometric Modeling and Computation


OpenGL Geometric Primitives

Geometry is drawn by specifying the geometric type and a sequence of vertices.

    glBegin(type);
    glVertex2f(x, y);
    glVertex2f(x, y);
    ...
    glEnd();

The geometric types include points, lines, and polygons:

Several forms of the vertex function are available for different dimensionality and argument types:

    glVertex{234}{sifd}(x, y [, z [, w]]);

where the curly braces { and } indicate the selection of one character from the list of alternatives, and the square brackets [ and ] indicate optional arguments.


On to drawing style...
Back to OpenGL...
Back to the overview...