tags:

views:

35

answers:

1

Hi everyone

I need your help. I know there is alpha in openGL, and it's help me to draw polygon on transparent mode, but I do not know how to do that, what should enable to allow opengGL to draw that polygon.

and thanks for any help.

+2  A: 

It's simple:

glEnable(GL_BLEND); //Enable blending.
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //Set blending function.

That's the basic, that blending function is the basic and should be fine for you, but there are others.

Then, you need to be sure that your window/framebuffer contains an alpha channel, and that the polygons you draw also contain alpha information.

Matias Valdenegro
thanks man this was good.
Hitman