Archived

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

Mike00

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

Recommended Posts

Mike00    122
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
zedzeek    529
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
Mike00    122
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