[gameprogrammer] Re: OpenGL Colours and Alpha

Heya Steve,

Yep you got it, you have to enable blending

glEnable(GL_BLEND); is the way to do it i think (dont have any gl code right
here at the moment!)

you also can change the type of blending you want with the glBlendFunc
command, so you can do alpha blending, additive blending, multiplicative
blending, difference blending etc. (:


On 10/31/06, Stephen Smith <gp@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi all,

I'm trying to implement the alpha value in my colours when drawing my
OpenGL scene.  I've changed all my colour commands to "glColor4f", and
have the fourth value as 0.1, except for lasers and explosions where I
have to set to 1.  My intention is that these should be bright compared
to everything else.  However, there doesn't seem to be any difference.
Can anyone tell me why?  Do i need "enable" alpha values or something?
(BTW, I'm using Java and JOGL, but since it's a direct mapping to OpenGL
it should be a non-Java specific answer).

Thanks in advance,

Steve Smith



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html



Other related posts: