Archived

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

Texture UVs

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

I''m trying to play with UV''s. From what I understood the U was the x of the picture and the V was the y. So, what I''m trying to do for now is display the upper left corner of the picture on a Quad. I''m using the following code, but it''s not giving the desired effect.
  

	glBegin(GL_QUADS);	
	
	glTexCoord2f(0,0);	
	glVertex3f(0,0,-10);
	
	glTexCoord2f(.5f,0);	
	glVertex3f(3,0,-10);

	glTexCoord2f(.5f,.5f);	
	glVertex3f(3,3,-10);

	glTexCoord2f(0,.5f);	
	glVertex3f(0,3,-10);

	glEnd();
  

A CRPG in development... Need help? Well, go FAQ yourself. "Just don''t look at the hole." -- Unspoken_Magi

Share this post


Link to post
Share on other sites