PDA

View Full Version : How do I make a triangle semi-transparent?



John Jenkins
10-08-2002, 06:17 AM
I want to draw shapes that you can kinda see through.

nexusone
10-08-2002, 06:26 AM
You need to have the blend function turned on and setup there alpha value for the color.

glEnable(GL_BLEND)
glColor4f( R,G,B,A) A values: 1 = non-transparent, 0.5 = 50% transparent, 0 = total transparent.

Use glDisable(GL_BLEND), to turn off blend.


Originally posted by John Jenkins:
I want to draw shapes that you can kinda see through.