Archived

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

Way to decide which object is on top (layers)?

This topic is 6387 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 got a box, and I want text to appear on it (but not with a texture). I call the draw text function, then the drawbox function (tried calling drawbox first also), but the text always appears behind the box! Is there another easy way to control the layers? Thanks!

Share this post


Link to post
Share on other sites
draw box
glDisable(GL_DEPTH_TEST)
draw text

sorry wrong answer maybe try someit like
glDepthFunc(GL_NEVER) or GL_LEQUAL

Share this post


Link to post
Share on other sites
Hmm, the first two made everything look weird. And the GL_LEQUAL
moved the Box to the top right of the screen (it''s normally in the bottom middle). Any ideas? Thanks!

Share this post


Link to post
Share on other sites