[gameprogrammer] Re: OpenGL Colours and Alpha
- From: Matthew Weigel <unique@xxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 31 Oct 2006 11:59:45 -0600
Alan Wolfe wrote:
> 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. (:
You also *have* to order the drawing of objects with an alpha value less
than 1 - draw objects that are further away first. This way, as closer
objects are drawn, they can take into account the colors of things
behind them.
For brightness, you may also want to switch to lights and materials
instead of colors.
--
Matthew Weigel
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: OpenGL Colours and Alpha
- From: Alan Wolfe
- References:
- [gameprogrammer] OpenGL Colours and Alpha
- From: Stephen Smith
- [gameprogrammer] Re: OpenGL Colours and Alpha
- From: Alan Wolfe
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
- [gameprogrammer] Re: OpenGL Colours and Alpha
- From: Alan Wolfe
- [gameprogrammer] OpenGL Colours and Alpha
- From: Stephen Smith
- [gameprogrammer] Re: OpenGL Colours and Alpha
- From: Alan Wolfe