3D Textures and Transformation

Well, I thought this might be a driver bug, but I suppose there just may be something I’m not initializing.

Quite simply, when I use the texture matrix to generate coordinates, the “r” texture coordinate (corresponding to the z position coord) always ends up zero. This is essentially all of my code related to texture coordinate generation:


	glScaled(0.5, 0.5, 0.5);
	glTranslated(1.0, 1.0, 1.0);
	glRotated(alpha, 1.0, 0.0, 0.0);
	glRotated(beta, 0.0, 1.0, 0.0);
	glRotated(gamma, 0.0, 0.0, 1.0);

Btw, when I generated the texture coordinates myself, essentially manually doing the exact same things the OpenGL specs say the above is supposed to do, it works great. It’s just when attempting to use the texture transform matrix that I end up with nothing but 0’s for my r coord.

[This message has been edited by Chalnoth (edited 11-05-2002).]

Which TexGen mode are you using? Did you correctly specify all three object or eye planes?

– Tom

Essentially all of the TexGen code that I used is right there. So, I guess I also, then, need to specify the object or eye planes? I imagine all I want is for the R plane to be identical to the default S,T planes, then…so what is the default for the S,T planes?

s = 1,0,0,0
t = 0,1,0,0
r = 0,0,0,0
q = 0,0,1,0
i think it was like that (from brain…)
but you can read it up yourself…

i think it would explain why you have funny messy things… at least its not an identity matrix…

You mean, that’s the matrix that is instantiated instead of the identity when I call LoadIdentity? That would be a bit odd…

And, do you know exactly where I can read up on it? I had a hard time picking the GL specs for this information…

[This message has been edited by Chalnoth (edited 11-05-2002).]

Never mind, I got it. Just had to set the object planes. Thanks for the help.