Environment Mapping!?

Has anyone got an idea how to do Environment Mapping on Polygons?
Can it be obtained only by using OpenGL Extensions or is there any other way!

Thanks for your Help in advance!
Martin

you can easily obtain environment mapping with the opengl sphere map.
however, it is not a real EM… much like chrome effects in old demos.

try this:

// activate sperical EM texture coord generation
// for this to work properly, you need to specify almost one normal per face
// since the sphere mapping algorythm need to know how your faces are oriented about the viewer (origin)
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP);
glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP);

// activate screen blending mode, don’t light primitives
glDisable(GL_LIGHTING);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_ONE);

// make texture ready
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
glBindTexture(GL_TEXTURE_2D,<texture id> );

// white
glColor3f(1,1,1);

<draw your primitives w/normals>

should be everything you need to start…

I have an example of doing environment mapping with and without an OpenGL extension on my webpage. The examples are on my programming page, they are the first two programs at the top of the page.

Nate http://nate.scuzzy.net

Thanks a lot for your Help!!