Advertisement

glBlendFunc

Started by November 17, 2001 09:00 PM
1 comment, last by gus 23 years, 3 months ago
How do I set glBlendFunc if I want a polygon to be completely visible if alpha = 1.0 and completely transparent if alpha = 0.0 ? thanks
The "common" setting for glBlendFunc() is

glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

You then have to render the polygons from back to front.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
You can almost do that using alpha testing:
  gEnable(GL_ALPHA_TEST);glAlphaFunc(GL_GREATER,0.0f);// RenderglDisable(GL_ALPHA_TEST);  


[Resist Windows XP''s Invasive Production Activation Technology!]

This topic is closed to new replies.

Advertisement