Advertisement Jump to content
Sign in to follow this  
Enlighten

Unexpected Texture Results

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

Here is a screen shot of the problem, http://img292.imageshack.us/img292/238/example1xf.jpg And here is the Quad code that makes it, glBindTexture(GL_TEXTURE_2D, texture[2]); glBegin (GL_QUADS); glTexCoord2f(0.0f,angle + 1.0f); glVertex3f(-15.0f,-10.0f,-75.0f); glTexCoord2f(1.0f,angle + 1.0f); glVertex3f( 15.0f,-10.0f,-75.0f); glTexCoord2f(1.0f,angle + 0.0f); glVertex3f( 0.0f, 0.0f,-75.0f); glTexCoord2f(1.0f,angle + 0.0f); glVertex3f( 0.0f, 0.0f,-75.0f); glEnd (); With this code it seems to me like the yellow lines should be going straight up, but for some reason the go to the side.. I don't understand why this is. Can someone explain why is looks like that? Thanks, Michael

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Enlighten
Here is a screen shot of the problem, http://img292.imageshack.us/img292/238/example1xf.jpg

And here is the Quad code that makes it,

glBindTexture(GL_TEXTURE_2D, texture[2]);
glBegin (GL_QUADS);
glTexCoord2f(0.0f,angle + 1.0f); glVertex3f(-15.0f,-10.0f,-75.0f);
glTexCoord2f(1.0f,angle + 1.0f); glVertex3f( 15.0f,-10.0f,-75.0f);
glTexCoord2f(1.0f,angle + 0.0f); glVertex3f( 0.0f, 0.0f,-75.0f);
glTexCoord2f(0.0f,angle + 0.0f); glVertex3f( 0.0f, 0.0f,-75.0f);
glEnd ();

With this code it seems to me like the yellow lines should be going straight up, but for some reason the go to the side.. I don't understand why this is.

Can someone explain why is looks like that?

Thanks, Michael


I changed the bold line. Does that help any?

Share this post


Link to post
Share on other sites
Agh.. It doesn't, I didn't think about it before, but after messing with some coordinates, it kinda looks like the texture doesn't really strech evenly between all four points like I thought it did. Instead... Well it's does things a little bit screwy, hard to explain, but does anyone know of a way to make a texture strech evenly between all four points? I hope that makes sense.

Thanks,
Michael

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!