PDA

View Full Version : glTexGen



HFAFiend
04-01-2001, 07:44 AM
How do I use this, and what is it usually used for?

Nutty
04-01-2001, 12:41 PM
You use it by enabling it in the appropriate texture dimensions.

i.e. glEnable(GL_TEXTURE_GEN_?);

where ? is S, T or R.

Enable S and T for sphere mapping. Enable R as well for cube mapping.

The method that S, T, and R will use to determine how the texture coords are generated is specified by glTexGeni(GL_?, GL_TEXTURE_GEN_MODE, GL_X);

Where GL_? is GL_S, GL_T, and GL_R, and GL_X, is one of GL_SPHERE_MAP, GL_EYE_LINEAR, GL_OBJECT_LINEAR, or GL_REFLECTION_MAP (cube mapping)

check out my website.. for some example code of using this.
www.nutty.org (http://www.nutty.org)

Nutty http://www.opengl.org/discussion_boards/ubb/smile.gif