Jump to content
  • Advertisement
Sign in to follow this  
Marvin

Texture rotation and glTexSubImage2D

This topic is 4589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!