# glAlphaFunc

specify the alpha test function

## Signature

glAlphaFunc( GLenum ( func ) , GLclampf ( ref ) )-> void
glAlphaFunc( func , )

## Parameters

VariablesDescription
func
Specifies the alpha comparison function. Symbolic constants GL_NEVER , GL_LESS , GL_EQUAL , GL_LEQUAL , GL_GREATER , GL_NOTEQUAL , GL_GEQUAL , and GL_ALWAYS are accepted. The initial value is GL_ALWAYS .
ref
Specifies the reference value that incoming alpha values are compared to. This value is clamped to the range $\left[0,1\right]$ , where 0 represents the lowest possible alpha value and 1 the highest possible value. The initial reference value is 0.

## Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glAlphaFunc
OpenGLContext tests/arbwindowpos.py Lines: 90
OpenGLContext tests/gldrawpixels.py Lines: 58