Sign in to follow this  
Schinizer

How to make a "absolute" plane?

Recommended Posts

Schinizer    122
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
AverageJoeSSU    564
there are a couple of ways of doing it.. you could draw your UI over you regular frame setting blend..

or you could draw an orthographic full screen quad...

maybe somebody else can elaborate on the details... i can't remember how to do the latter..

Share this post


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

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