When using an environment map to render an object, we assume that the environment map is relatively position independent with respect to the object being rendering. This simply means, for example, that when we use a single environment map to render a shiny metallic teapot, we are assuming that the ``environments'' of all the points making up the teapot are all approximately the same. For convex objects such as a sphere that is relatively distant from the other objects making up the sphere's environment, this is a very reasonable assumption. For a non-convex object such as a shiny torus, the assumption is not very good because the torus, being non-convex, can reflect itself. Such inter-reflections are position dependent and therefore can not be captured by an environment map.
Even in a case such as a torus that has the opportunity for inter-reflections, we often still use environment mapping. The object's shiny surface simply will not reflect itself. Most observers will not even notice the lack of inter-reflections, particularly in the context of an animated scene. Environment mapping is often convincing even when applied in situations that, technically, are not well suited to the technique. The simple fact is that human observers are typically easily impressed by shiny rendered objects (they are a lot like raccoons in this respect) and are very trusting in the authenticity of reflections, particularly on complex curved surfaces.
Keep in mind that the environment of an object is a complete 360 degree panorama. This leads a problem when you try to encode the environment as a 2D texture. The implicit topology of OpenGL's 2D texturing functionality is that of an infinite plane with texture coordinates simply interpolated between vertices using (ideally) barycentric coordinates. Anyone versed in planar and spherical geometry understands the sort of problems this mismatch of topology creates.
Before we can use OpenGL texturing for environment mapping, we must first decide on a parameterization of the environment that works given the way OpenGL interpolates texture coordinates. Multiple parameterizations are possible. Blinn and Newell originally described a cylindrical parameterization indexed by polar coordinates. Unfortunately, 2D texture coordinates parameterized as an abscissa and polar angle are not interpolated correctly by conventional texturing hardware as supported by OpenGL. Figure 65 demonstrates this point.
Three common environment map parameterizations are sphere mapping, dual paraboloid mapping, and cube mapping. Each will be described in turn. Each parameterization has different advantages and disadvantages.
You can use environment maps to represent any effect that depends only upon a 3D orientation. These effects include specular and directional diffuse reflection, refraction, and Phong lighting. Several of these effects are discussed in the context of OpenGL's sphere mapping capability, but they are applicable to other parameterizations as well.