|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [gameprogrammer] Re: openglHow
Hi There,
In my "Limited..." OpenGL experience I would say that you DO need to render transparent elements last. The GL_BLEND settings blend what you are drawing with what is already there (or has already been drawn). Also, I have found that some cases require you to turn off GL_DEPTH_TEST and then turn it back on when you have completed rendering your transparent elements. This means (as you would normally have GL_DEPTH_TEST switched on for 3D) that grouping your transparent elements together and rendering them last should acheive the desired effect.
e.g.
glEnable(GL_DEPTH_TEST)
glDisable(GL_BLEND)
..... Render a building .....
glDisable(GL_DEPTH_TEST)
glEnable(GL_BLEND)
..... Render the windows .....
This works for me.
Regards
Richard
On 29/04/07, Stephen Smith <gp@carlylesmith.karoo.co.uk> wrote:
Do you need to draw transparent objects last, to ensure that "hidden"
|
|