Skip to main content
GameDev.net gamedev.net
🔒 Locked

Depth Test/ Transparency

Started by pr0teus Oct 14, 2000 at 12:22 AM 0 replies 350+ views
Original Post
pr0teus
pr0teus
Hi, What I have is an array of objects that I use masks to blend onto the screen, so that my world can be seen through the background of my texture. The problem is, I have to turn depth buffer writes of (glDepthMask(GL_FALSE)) in order to do the masking, and by doing so sometimes an object that is farther away from the camera appears in front of another transparent object that is closer to the camera. Is there a way to correct this with OpenGL functions? I have sorted the array by z and tried to go through the array forwards or backwards depending on camera orientation. It did not seem to work, although I may have something wrong with that code. Ben
OGAPO
OGAPO
the problem is probably with your sorting and/or writing algorithm, but also make sure you call GlFlush() at the end of drawing, this *may* help but it''s not likely, it probably has to do with the order your are drawing the polygons
Brought to you by: [email=ogapo@ithink.net]O.G.A.P.O.[/email] +----------------------------------------+| Surgeon General's Warning - || OGAPO can cause serious mental damage || if taken in large doses. |+----------------------------------------+/* Never underestimate the power of stupid people in large groups */

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.