Archived

This topic is now archived and is closed to further replies.

what is glAlphaFunc ?

This topic is 5754 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, in some code that makes blending i saw functions : glAlphaFunc(GL_GREATER,0.0) and glEnable(GL_ALPHA_TEST); can some one please explain to me what does those calls do? Flutey Shady El Mously Egyptian Game Programmer (there is no knowledge that is not power)

Share this post


Link to post
Share on other sites
The alpha test causes the alpha values of every pixel to be tested. If they past the test, they are drawn. Otherwise, they are not. The way they are tested is determined by glAlphaFunc. In the case of your example, only pixels with an alpha value greater than 0.0 will be drawn.

Technically, the alpha test and function have nothing to do with blending.

Share this post


Link to post
Share on other sites