• Advertisement
Sign in to follow this  

How to make a "absolute" plane?

This topic is 3164 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
Advertisement
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
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
Sign in to follow this  

  • Advertisement