Help with texture rotations

Hi, i’m trying to rotate a texture and apply it to an object. The code is:

  
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(rot,0, 0, 1);
glMatrixMode(GL_MODELVIEW);
Draw_Object();

Funny thing happens: ALL the textures rotate except the one that i want :confused:

Have you set glActiveTexture()?

yooyo

Hi, what i’m doing is:

cgGLEnableTextureParameter( g_CGparam_steam_animation );
cgGLSetTextureParameter( g_CGparam_steam_animation, heat_effect_textures.texID);

glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(rot,0, 0, 1);
glMatrixMode(GL_MODELVIEW);

Draw_Object();
cgGLDisableTextureParameter( g_CGparam_steam_animation );

  

Which texture unit are you using? You may recall that you only have a texture matrix stack for the implementation defined MAX_TEXTURE_UNITS. I’ve been bamboozled by this one before.

What do you mean ? :confused:

I mean that each texture unit has its own matrix stack, and the total number of texture units is implementation defined. You can use glGet*() with MAX_TEXTURE_UNITS to get the number. You can read about this in chapter 2 of the spec, if you’re interested.

Number returned is 8. So that means i can use up to 8 texture with multitexture extension ? Or else ?