Jump to content
  • Advertisement
Sign in to follow this  
noodleBowl

UV Texture mapping?

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

Edited by WiredCat

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
×

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!