Jump to content
  • Advertisement
Sign in to follow this  
Sollum

Texturing issues

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

Hello,

I have an issue with loading of a texture onto my model (*.obj files). At the moment i am not sure what is the issue, but i have few ideas.

I am trying to use NeHe's texture loading example ( http://www.nulltermi.../gltexture.html ), he uses RAW file format, so i thought maybe i could convert TGA to RAW on my photoshop... But textures seem to lie down wrongly.

If i convert TGA to RAW, will vt's point to the same place? If that's not the case then i guess i am in a deep deep deep hole >.>



Edit:
I solved this issue myself. The problem is that when you use this loader, it vertically flips your image. Possible solutions:
1) Flip your texture vertically with pic editing program.
2) When passing V coordinate, pass 1 - V

Example

glTexCoord2f(
objData->textureList[objData->faceList->texture_index[0]]->e[0],
1 - objData->textureList[objData->faceList->texture_index[0]]->e[1]);

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!