Advertisement

Problem with blending

Started by June 29, 2003 01:40 PM
5 comments, last by Mkk 21 years, 8 months ago
When I use blending like in tutorial 8, and I have set glColor4f(1.0f, 1.0f, 1.0f, 1.0f), why I can still see texture behind my another texture like there would be still some transparency on it? [edited by - Mkk on June 29, 2003 2:41:32 PM]
if your using glBlendFunc(GL_SRC_ALPHA,GL_ONE); the black in an image will always be transparent.
Advertisement
Ok.. any idea what settings should I use then? (to get zero transparency for the texture when alpa is 1.0)
Hmm, it´s not only black that gets mixed with other texture, it´s same what color of textures I try, they still get mixed when they are one upon another.


[edited by - Mkk on June 29, 2003 10:55:56 PM]
If you have MFC I have a blending demo on my site that lets you experiment with the different source and destination functions. Don''t know if it''ll help but thought I''d volunteer it.

Love means nothing to a tennis player

My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

Remember: When using this blendfunc you must draw all non-transparent objects first and then draw all blended one''s BACK TO FRONT!

Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]


GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

Advertisement
Thanks for the info! :-)

This topic is closed to new replies.

Advertisement