PDA

View Full Version : alpha value



Ray
10-13-2000, 02:09 AM
i would like to know how to use the alpha values.When i use glcolor4f(red,green,blue,alpha) the modelled object is not transparent. I don't know why?
Thank for help.

Roach
10-13-2000, 03:01 AM
Are u using a blend function? To make objects transparent you need to do:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

Try doing at least this, also remember that you have toreaw the object you want transparent after everything else is drawn. Also remember to draw from back to front. Culling and depth buffering may also need to be enabled.

Hope this sheds some light on the matter http://www.opengl.org/discussion_boards/ubb/smile.gif
for more info NeHe has some good toutorals on this subject. http://nehe.gamedev.net

Roach

MChis
10-14-2000, 04:36 AM
Hi!
Are you using Alpha Channel in the texture?
Ta lueK!

<MChiz> http://www.opengl.org/discussion_boards/ubb/smile.gif