Transparency and Depth

Functions

glutInitDisplayMode( GL_RGBA | GL_DEPTH ...);
glClearColor(R,G,B,A);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPH,GL_ONE_MINUS_SRC_ALPHA);

Topics

Demos

Written by Scott D. Anderson
scott.anderson@acm.org
Creative Commons License
This work is licensed under a Creative Commons License.

Valid HTML 4.01!