Jump to content
  • Advertisement

Archived

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

flutey

what is glAlphaFunc ?

This topic is 5969 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!