Some OpenGL alpha-blending problems

Started by
1 comment, last by Bong 22 years, 7 months ago
I''m currently working on a 2d tile engine for OpenGL, and I''ve got two little problems... 1. Whenever I use alpha-blending with textured quads, the texture is ALWAYS at least half transparent. When I disable alpha-blending, it displays normally, but I can''t get it to display alpha-blended quads at full opaqity, even with glColor4f(1,1,1,1); 2. When I load 32bit textures from TGA files, some green colors are distorted and less detailed. I have a Voodoo 3 GFX card, by the way, it that helps any. Thanks for reading this, let me know if have a solution. - Bong, James Bong
- Bong, James Bong
Advertisement
Are you sure the TGA''s alpha channel is actually opaque? If you''re blending while using it as a RGBA texture.

I''m not sure about your specific case, but some Voodoo cards don''t like 32bit too much. I don''t know what situations exactly though, since I never personally owned a Voodoo.

Do any other programs have either of these problems.

[Resist Windows XP''s Invasive Production Activation Technology!]
1. You''re using the wrong blending function. To achieve translucent affects you should call this at the beginning of your program:

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 


2. Try using a higher depth for the internal texture format.

This topic is closed to new replies.

Advertisement