masking with alpha and nehe's tga loader...
I''m so frustrated I''m ready to go postal!
Here''s the poop - I''m trying to map a smiley face texture to a poly and not draw the area on the outside of the smiley circle. I''m using nehe''s tga loading code (which is supposed to support alpha channels) and am saving my texture as a 32bit TGA. I''m enabling GL_ALPHA_TEST before my draw and disabling after the draw. I''m saving my texture in photoshop with an alpha mask but can''t seem to get the alpha to be observed.
Can anyone step me through it before I go insane???
Thanks in advance...
One thing I forgot to mention is that it works if Blending is enabled, but then the textures behind the 32bit texture shows through a little which is exactly what I don''t want...
Try Nate''s OpenGL site (NeHe has a link) he has what you want. Also, look at NeHe''s masking tutorial.
Ben
Ben
try setting the blending mode to GL_ONE, GL_ONE_MINUS_SRC_ALPHA
then just remember to set it back to one,one if you don''t disable bllending
then just remember to set it back to one,one if you don''t disable bllending
Brought to you by: [email=ogapo@ithink.net]O.G.A.P.O.[/email] +----------------------------------------+| Surgeon General's Warning - || OGAPO can cause serious mental damage || if taken in large doses. |+----------------------------------------+/* Never underestimate the power of stupid people in large groups */
try setting the blending mode to GL_ONE, GL_ONE_MINUS_SRC_ALPHA
then just remember to set it back to one,one if you don''t disable bllending
then just remember to set it back to one,one if you don''t disable bllending
Brought to you by: [email=ogapo@ithink.net]O.G.A.P.O.[/email] +----------------------------------------+| Surgeon General's Warning - || OGAPO can cause serious mental damage || if taken in large doses. |+----------------------------------------+/* Never underestimate the power of stupid people in large groups */
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement