• ### Announcements

#### Archived

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

# 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.


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 on other sites
Brian Jones    122
It looks like you''re using coordinate of the lower left corner of the texture

##### Share on other sites
Well, specify what effect you get, and what effect you would liek to get.

Height Map Editor | Eternal Lands | Fast User Directory

##### Share on other sites
Sander    1332
In an image editor (0,0) is the top-left corner of your image. In OpenGL (0,0) is the bottom-left corner. so u=x and v=1-y

Sander Maréchal