Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dantas

Depth Test

This topic is 6103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
no it doesnt clear anything
just draws it in a different way
so in orthogonal
thats why its always on top

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!