Jump to content
  • Advertisement

Archived

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

xg0blin

using texture matrix

This topic is 5832 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!