Jump to content
  • Advertisement
Sign in to follow this  
programmer88

OpenGL TGA loading problem

This topic is 4340 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 recently started coding a simple engine, when i hit my first problem... I tried to draw a sprite from the TGA class from the Beginning openGL game programming book and it worked fine until i changed the TGA file from a 128 X 128 picture to a 512 X 512 picture, when this ugly artifact appeared. The green/pink mesh is where the image should be (its drawn to a quad) Help!!! http://geocities.com/rankine_software/strangeerror.jpg

Share this post


Link to post
Share on other sites
Advertisement
Looks like the effect you get when you lie to OpenGL about the number of components in the source image. For example, if the TGA is an RGB image, but you say it's an RGBA. Check the exact format of the TGA and make sure the third and second last parameter to glTexImage matches that format.

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.

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!