TGA/Transparency Problems

Started by
2 comments, last by Darkeye 21 years, 10 months ago
Hey, I''m in serious need of some help here, I''m going insane trying to solve this. Bascially I am trying to draw a 32 bit TGA with the transparent bits missing. I made a tga with a transparent background using GIMP, and load it using NeHe''s TGA loading code, but when I draw it onscreen, it just draws the transparent sections black. I don''t know if there is a problem with the .tga file, or I am using the wrong blendfunc. If anyone could send me a .tga file that they can confirm works properly with transparency in it, or if someone could tell me what blendfunc I should be using, I would be most greatful. My email address to send the file to is darkeye@exile.asylumnet.org Thanks a lot.
Advertisement
You should use...

glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Cheers, although I just found the glAlphaFunc function, which does the job fantastically
OK but the TGA must have a "alpha channel" for correctly working.

========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/

This topic is closed to new replies.

Advertisement