PDA

View Full Version : Two questions ... read please :D



lsdi
05-15-2002, 11:51 AM
First:

How do I avoid using auto-texture-coord generation (how to calc tex coords)?


Second:

How do I implement Detail Texturing while using auto-tex-coord generation?


Lot of thanks
and sorry about my english. http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Morglum
05-15-2002, 10:04 PM
First question : that's easy ! Just specify your texcoords with glTexCoord2f (or glTexCoord2fv or glTexCoordPointer...).
To disable texcoord generation (anyway it's off by default), call :
glDisable (GL_TEXTURE_GEN_S);
glDisable (GL_TEXTURE_GEN_T);

Second question : I couldn't give you a complete answer since I've never tried detail texturing. Maybe you could look on the Extension Registry somewhere on this site. It's a catalogue of all opengl extensions, with many explanations on each.

Morglum

tfpsly
05-15-2002, 11:09 PM
Detail texturing is just applying a second texture that is tiled very often.

Just enable blending, choose a blending function, select your texture, and alter the texture matrix using glScale.