• Advertisement
Sign in to follow this  

UV Texture mapping?

This topic is 891 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 was wondering if someone could clear up some confusion for me. Its simple really, what should my numbers look like for UV texture coords?

 

The reason I ask is that I am using libpng to load in my textures, but when I run my application the image is flipped upside down. I'm wondering if my texture coords are just mapped wrong or if its an other problem

 

Here is a visual of my issue

[attachment=29582:uvCoords.png]

 

Any ideas?

 

Share this post


Link to post
Share on other sites
Advertisement

Can you list your vertices? (x,y,z,u,v). I am kinda confused that still on the desktop y points downwards, but I think default in OpenGL is y up. Windows Bitmaps were drawn from bottom to top at the beginning I think.

Share this post


Link to post
Share on other sites

because opengls coords are:
 
bottom left is 0,0
 
top left is 0,1
 
top right is 1,1
 
and bottom right is 1,0

 
Looks like I have been wrong for a very long time. Always thought that the 0,0 of a texture mapping would be the upper left hand corner. Edited by noodleBowl

Share this post


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

  • Advertisement