OpenGL - Part II

Notes

Onscreen

Print

Sample programs [source, PC binaries]

Be sure to examine each of these to see how the OpenGL calls mentioned in class are employed in practice.


Lighting spec.

light.c - simple light source
light_flat_shading.exe
light_smooth_shading.exe


movelight.c - movable light
movelight.exe

Refer to 'Basic OpenGL Lighting' for more info. on lighting.


Material spec.

teapot.c - shaded teapot
teapot.exe


Variety of materials

teapots.c
teapots.exe


NURBS surface spec.

This is an 'advanced' example, feel free to skip it.

molehill.c
molehill.exe


Texturing

Here's a sampling of texture-related calls you need to know:

texgen.c - texture generation over surface
texgen.exe

texture.c - simple texture mapping
texture.exe

texmapping.c - texture mapping of a PPM image over a cube
texmapping.exe

texmap.ppm - this is the *binary* PPM image used as the texmap
[example and PPM image orig. by Don Fussell, CS Dept., U. Texas]


Fog (a simple 'environmental' effect)

fog.c - environmental influence
fog.exe


A 'complex' example

dinoshade.c - shadow, reflection!
dinoshade.exe