This document discusses color and texture mapping in OpenGL. It explains that glColor sets the color state and colors are linearly interpolated along vertices. It then defines different OpenGL texture types including 1D, 2D, 3D, cube map, and array textures. It describes how glTexImage2D creates a texture from image data and sets the texture state. Finally, it briefly mentions texture filtering, wrapping, mipmapping, and providing example code.
6. Texture
http://www.opengl.org/wiki/Texture
GL_TEXTURE_1D: Images in this texture all are 1-dimensional. They have width, but no height or depth.
GL_TEXTURE_2D: Images in this texture all are 2-dimensional. They have width and height, but no depth.
GL_TEXTURE_3D: Images in this texture all are 3-dimensional. They have width, height, and depth.
GL_TEXTURE_RECTANGLE: The image in this texture (only one image. No mipmapping) is 2-dimensional.
Texture coordinates used for these textures are not normalized.
GL_TEXTURE_BUFFER: The image in this texture (only one image. No mipmapping) is 1-dimensional. The
storage for this data comes from a Buffer Object.
GL_TEXTURE_CUBE_MAP: There are exactly 6 distinct sets of 2D images, all of the same size. They act as 6
faces of a cube.
GL_TEXTURE_1D_ARRAY: Images in this texture all are 1-dimensional. However, it contains multiple sets of
1-dimensional images, all within one texture. The array length is part of the texture's size.
GL_TEXTURE_2D_ARRAY Array: Images in this texture all are 2-dimensional. However, it contains multiple
sets of 2-dimensional images, all within one texture. The array length is part of the texture's size.
7. Texture
• GL_TEXTURE_2D: Images in this
texture all are 2-dimensional. They
have width and height, but no
depth.
8. glTexImage2D
• Creates The Texture from an array of
bytes and sets the texture “state”
• All subsequent calls are on this texture
11. Filtering
• Textures rarely map 1-1 to geometric
primitives.
• You can set magnification filters or
minification filters.
• Linear interpolation or nearest neighbor
• glTexParameter
12. Texture Wrapping
• When texture coordinates fall outside 0-1
• REPEAT, CLAMP, CLAMP_TO_EDGE,
CLAMP_TO_BORDER
Texture mapping is a term from computer graphics which means to display a 2- D image over a surface in 3-D.\nTexels - 0-1. (usually S, T sometimes U,V).\n