Blending
Enable blending
glEnable(GL_BLEND)
Set the blending function
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
Assign alpha < 1
glColor4f(1, 0, 0, 0.5)
or
glMaterialfv(GL_FRONT, GL_DIFFUSE,
[1, 0, 0, 0.5])
Example:
transparent.py
next