🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

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

Started by
1 comment, last by Mike00 23 years, 11 months ago
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!
Advertisement
draw box
glDisable(GL_DEPTH_TEST)
draw text

sorry wrong answer maybe try someit like
glDepthFunc(GL_NEVER) or GL_LEQUAL
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!

This topic is closed to new replies.

Advertisement