Depth Test

Started by
3 comments, last by dantas 22 years, 2 months ago
I''ve been searching thru the posts most of the day and I cant find my problem exactly, but some are close. I have a terrain as a floor with defined height to show peaks and valleys and any other user defined objects. After that, using a second pass, any user defined text is drawn as textures using an ortho projection. My problem is that the text is always displayed even when it is located behind a peak. Is this happening because of the second pass or because it''s drawn in a projection or something else? I''ve checked the z values and they are correct and the depth test is enabled.
Advertisement
u want the text to appear like its part of the world?
dont change to a ortho projection matrix 2 draw the text but use billborded polygons in the current world scene

http://uk.geocities.com/sloppyturds/gotterdammerung.html
Yes, that''s exactly what I''m trying to do.

I havent used billboards before, so I''ll search around to get more info on them so I can try it.

Is there a problem with drawing things in the ortho projection? Does anyone know if it clears the z buffer? I have not found any documentation stating that resetting the near/far planes cause the z buffer to be cleared.
no it doesnt clear anything
just draws it in a different way
so in orthogonal
thats why its always on top
Also, why is it that if I draw using glBitmap (to draw the text as a bitmap) or glCallLists (to draw as a font), the depth test works in ortho, but the textures do not.

This topic is closed to new replies.

Advertisement