FourTextures

FourTextures is sample C++ code illustrating the use of multiple textures in OpenGL.   It is intended to accompany the book 3D Computer Graphics: A mathematical approach with OpenGL, by S. Buss, Cambridge University Press, 2003.   However, it can be used independently as well.

FourTextures reads four texture map from a bitmap file (.bmp extension).   The main program is in TextureMap.cpp.   The C++ class RgbImage is used to read the images' data from a bitmap files.

There are several options for downloading the files.

Things to look at:

  1. Compile and run the program.  Note how it behaves when the window is resized larger and smaller.  Do you see any unwanted aliasing problems?
  2. Examine the code and figure out how to use OpenGL to manage multiple textures.