TGA/Transparency Problems
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.
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
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
OK but the TGA must have a "alpha channel" for correctly working.
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement