PDA

View Full Version : what's the effect of coefficient in glTexGen



sosozcm
02-13-2011, 08:16 PM
for example:
GLflaot currentCoeff={1.0,0.0,0.0,0.0}
glTexGenfv(GL_S,GL_OBJECT_PLANE,currentCoeff);
how the coefficient which is currentCoeff above effect the texture coordinate? i have look up the Specifications about the TexGen function, but it seems talk just a little about it.

mobeen
02-13-2011, 08:23 PM
The manual explains the coefficients nicely http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml

sosozcm
02-14-2011, 12:31 AM
thank you for the manual.
and as it says,in my example the reference plane is X=0;and i run my programm, it goes well.
when i change currentCoeff to {0.0,1.0,0.0,0.0}.as the manual says the reference plane should be Y=0. but when i run the program, it seems the reference plane is Z=0.
when i change currentCoeff to {0.0,0.0,1.0,0.0}.i run the program, it seems the reference plane is Y=0.
So i don't know what's why.