PDA

View Full Version : selecting texture for rotations



alark
07-07-2003, 11:35 AM
Hi,
I have a 2d texture and a 3d texture and would like to rotate the 3d texture depending on the mouse movements. Is there any way that I can select the 3d texture before I operate on it.
thanks a lot,
alark

jwatte
07-07-2003, 01:31 PM
Yes. Assuming the 3D texture lives on texture unit 1, simply:

glActiveTexture( GL_TEXTURE1 );
glEnable( GL_TEXTURE_3D );
glMatrixMode( GL_TEXTURE );
glLoadIdentity();
glRotatef( whatever );