Jump to content

  • Log In with Google      Sign In   
  • Create Account


Some OpenGL alpha-blending problems


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Bong   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 August 2001 - 05:42 PM

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

Sponsor:

#2 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 24 August 2001 - 06:26 PM

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!]

#3 wolfman8k   Members   -  Reputation: 140

Like
Likes
Like

Posted 25 August 2001 - 04:00 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS