Strange problems with TGA files

This topic is 3688 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hey. I just went through my current code, and set it up to load TGA's, and changed all of my BMP's to TGA's, setting the black in each one to alpha with the "magic wand" in Paint.net by deleting the black area, leaving transparency. I saved the images as RLE compressed, 32 bit TGA's, but I get very strange problems when I load them. I know it is not my code, since the tga's that came with the nehe lesson load just fine. Here is what I am getting: <br/> Any thoughts? I don't have photoshop, but I have also tried this in GIMP, to no avail.

Share on other sites
Have you tried not compressing them?

Share on other sites
Tried that, but it didn't work. I got this working, was using GL_RGB, should have been GL_RGBA. Now I don't have transparency, but white backgrounds... I'm going to work on this and see what I get.

Share on other sites
OK, I found a GL_RGB which should have been GL_RGBA, and then did this:
glEnable(GL_ALPHA_TEST); //Enable alpha-blendingglAlphaFunc(GL_GREATER, 0.5f); //drawglDisable(GL_ALPHA_TEST);

It now works.

1. 1
2. 2
3. 3
4. 4
frob
15
5. 5

• 16
• 12
• 20
• 12
• 18
• Forum Statistics

• Total Topics
632160
• Total Posts
3004497

×