CS312 Lab 5: Textures
- Copy the demo executables texture from ~eeaton/public/cs312/handouts/gldemo
to your own directory. Run.
- Write a program to display a texture mapped cube
(all 6 sides).
- In the handouts directory, there is a sub
directory containing textures in ppm format ~eeaton/public/cs312/handouts/ppm.
- ppm (Portable Pixel Map) is an image file
format and you can find out more about it with the unix command "man ppm"
- ppms can come in one of two versions, an
ASCII and a corresponding binary version (i.e. the color information
stored as ASCII text or as binary). The ASCII format is easier to
process (since it's human-readable), but is much larger and less
space-efficient than the binary version.
- Most image viewer such as Gimp or Irfanview
(Windows) can convert a ppm from binary to ASCII and the otherway
around. Some of the sample textures in the handouts directory
come in both formats. Use the code I provided in an e-mail
earlier this week for reading in the ppm texture from a file.