Example: transparency.py
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE) | disables writing to the color buffer - only depth information will be written |
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) | re-enables writing to the color buffer |
glDepthFunc(GL_EQUAL) | a "fragment" is drawn only if its depth is the same as what's already in the depth buffer |
glDepthFunc(GL_LESS) | default depth-buffering mode. a fragment is only drawn if it's nearer than what's already in the depth buffer |