13.016 Introduction to Geometric Modeling and Computation
OpenGL Drawing Style
While the geometric primitives describe what should be drawn, they do not specify how things should be drawn. The appearance of the geometry is controlled by setting the values of the OpenGL state.
State values for things such as color, line width, etc. stay into effect until changed.
Color
glColor{34}{sifd}(red, green, blue [, alpha]);
Points
float size; glPointSize(size);where size is specified in pixels.
Lines
float width; glLineWidth(width);where width is specified in pixels.
int factor; short pattern; glLineStipple(factor, pattern);where factor scales the bit pattern, and pattern is the repeating bit pattern. Each bit of pattern specifies the on/off state of a pixel.
Note: this function only defines the current line pattern. To actually begin to use the pattern, call the function:
glEnable(GL_LINE_STIPPLE);
To finish the use of the pattern, call:
glDisable(GL_LINE_STIPPLE);
On to mapping to the viewport...
Back to geometric primitives...
Back to the overview...