Skip to main content
GameDev.net gamedev.net
🔒 Locked

TGA loading problem

Started by programmer88 Sep 29, 2006 at 9:07 AM 1 replies 750+ views
Original Post
programmer88
programmer88
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
Brother Bob
Brother Bob
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.
programmer88
programmer88
Thanks, it works now :p what a simple mistake lol

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.