Archived

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

Nazrix

Texture UVs

Recommended Posts

Nazrix    307
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