Tom Kelliher, CS 320
Feb. 16, 2000
Monday is ``lab day.''
Have a look at, and run, viewport.c and paint.c (available on the class home page).
Finished primitive basics.
Viewports, interaction.
Additive color model:

Tristimulus value.
Notes:

glColor3f(1.0, 0.0, 0.0);
glClearColor(1.0, 1.0, 1.0, 1.0);
At any point in time, we should be able to specify any
colors from
the total collection of
colors.
Use of a color-lookup table:

2-D viewing:
What is clipping?

and centered at
the origin.
The orthographic projection:
onto
.
void glOrtho(GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top,
GLdouble near, GLdouble far);
void glOrtho2d(GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top);
``Multiply the current matrix with an orthographic matrix'' --- make the
projection matrix the current matrix.
OpenGL matrices:
Translation, rotation, scaling.
Orthographic, perspective.
Several we've already seen:
glutInit(int *argcp, char *argv[])
glutCreateWindow(char *title)
glutInitDisplayMode(unsigned int mode)
Example:
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);Mode bit examples:
GLUT_RGBA, GLUT_RGB, GLUT_INDEX.
GLUT_SINGLE, GLUT_DOUBLE.
GLUT_DEPTH.