Sign in to follow this  
Marvin

Texture rotation and glTexSubImage2D

Recommended Posts

Marvin    127
Hi, i'm trying to place one texture onto another using glTexSubImage2D, however i want to rotate the child texture before placing it on the parent texture, translation is no problem because glTexSubImage2D lets me specify an ofset. I've come across the below method for manipulating texture rotation, but i can't figure out if or how i can use this with glTexSubImage2D without also rotating the parent texture. Any help appreciated.
glBindTexture(GL_TEXTURE_2D, id);

glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(angle);
glMatrixMode(GL_MODELVIEW);

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this