[gameprogrammer] Re: OpenGL Colours and Alpha
- From: "Alan Wolfe" <alan.wolfe@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 31 Oct 2006 09:23:10 -0800
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
- Follow-Ups:
- [gameprogrammer] Re: OpenGL Colours and Alpha
- From: Matthew Weigel
- References:
- [gameprogrammer] OpenGL Colours and Alpha
- From: Stephen Smith
Other related posts:
- » [gameprogrammer] OpenGL Colours and Alpha
- » [gameprogrammer] Re: OpenGL Colours and Alpha
- » [gameprogrammer] Re: OpenGL Colours and Alpha
- » [gameprogrammer] Re: OpenGL Colours and Alpha
- » [gameprogrammer] Re: OpenGL Colours and Alpha
- » [gameprogrammer] Re: OpenGL Colours and Alpha
- » [gameprogrammer] Re: OpenGL Colours and Alpha
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
- [gameprogrammer] Re: OpenGL Colours and Alpha
- From: Matthew Weigel
- [gameprogrammer] OpenGL Colours and Alpha
- From: Stephen Smith