PDA

View Full Version : transparency



omkar26
07-02-2001, 11:25 PM
hi,
How do i make a part of an object transparent?? The object is made of a set of vertices . The vertices have 3 attributes: position, color and alpha value.
SOS.

07-02-2001, 11:32 PM
Enable blending

glEnable(GL_BLEND);
// look at many blending modes for the one that suits your needs a common blending mode is
glColor4f(r,g,b,a);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
render(object);
glDisable(GL_BLEND);

texture environment does effect blending.
glDisable(GL_TEXTURE_2D);