Sign in to follow this  

How to make a "absolute" plane?

This topic is 3093 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

Hi all. I'm having this problem with my UI for quite a long time. The problem is, no matter how near I draw the UI to my screen, my model/terrain will block it. What I am trying to achieve is this: WarcraftIII UI I'm trying to make my UI "absolute", make it the top layer, nothing can block it. I have the following for my UI:

glTranslatef(0.0f, 0.0f, -cRadius);

glPushMatrix();
glTranslatef(-20.0f, 13.5f, cRadius-30.0f);
drawINotice();
glPopMatrix();


I thought of using scissor test. However, scissor test defines a quad region where you can modify the object. I think I am trying to do the reverse. Anyone knows any techniques? Or any solutions?

Share this post


Link to post
Share on other sites
Turn off depth testing, and use an ortho projection which im guessing you already are. If whats happening is what i think, disabling depth test when drawing the 2d overlay will always overwrite your 3d pixels with your 2d, draw your 2d stuff after the 3d.

Share this post


Link to post
Share on other sites

This topic is 3093 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this