PDA

View Full Version : GL_TEXTURE glRotate during GL_SPHERE_MAP



PT
03-13-2002, 04:28 PM
I've developed an environment mapping application in which I allow users to rotate their reflection map image. I accomplish this with glRotate during GL_TEXTURE matrix mode. However the image appears to "slide off" of the model as the rotation is about the origin of the texture coordinates.

To correct the "slide" effect, I believe I need to translate the image center to the TC origin, do the rotation, and translate it back. Unfortunately (or fortunately, depending on your perspective - I'd hate to have to generate spherical mapping texture coordinates myself!) I'm using glTexGeni to calculate my texture coordinates. So I don't know the limits of the resultant texture coordinate values.

Does anyone know how to query OpenGL as to the values or limits of OGL-generated texture coordinates? Or is there a better method to accomplish image rotation during environment mapping?