Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

xg0blin

using texture matrix

This topic is 5747 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

Ok, I have a cloud texture mapped over my players head. I am trying to get the texture to move over the surface of the quad, without affecting the other textures of course. I cannot get it to work. Here's an idea of what I'm trying.
    
static float trantex = 0.0f;
...
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, trantex);
glMatrixMode(GL_MODELVIEW);

glBindTexture(GL_TEXTURE_2D, textures[2]);
glBegin(GL_POLYGON);
	glTexCoord2i(0, 0);
	glVertex3f(-128, 32, -128);
	glTexCoord2i(1, 0);
	glVertex3f(128, 32, -128);
	glTexCoord2i(1, 1);
	glVertex3f(128, 32, 128);
	glTexCoord2i(0, 1);
	glVertex3f(-128, 32, 128);
glEnd();

trantex += 0.01;

glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
  
anyone know how to do this? [edited by - xg0blin on December 27, 2002 3:02:10 AM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!