ignoring zbuffer

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
yin nadie
Posts: 43
Joined: Wed Mar 31, 2004 1:03 pm
Location: Seville, Spain
Contact:

ignoring zbuffer

Post by yin nadie »

I have already learned (meaning I think it's true) that setting the EMF_ZBUFFER flag as false for an object, it ignores the Z-Buffer. Question is: Is there a simple way for the object to appear on top always?
Nessie
Posts: 14
Joined: Thu Apr 08, 2004 4:27 pm
Location: Madison, WI, USA

Post by Nessie »

Hmmm, and you need this for?

I know that with many First Person Shooters, guns for the first person player have a tendency to clip into walls, which is really nasty looking. Consequently, games like Quake end up using a depth hack to 'solve' the problem.

More specifically, I believe it's glDepthRange (in openGL) that is used in Quake games. I think the values used are something like glDepthRange( 0.0, 0.3 )....but my memory is a bit hazy in that regard.

Is this sort of what you are talking about?
"Build a man a fire and he'll be warm for the evening. Set a man on fire and he'll be warm for the rest of his life." -unknown
yin nadie
Posts: 43
Joined: Wed Mar 31, 2004 1:03 pm
Location: Seville, Spain
Contact:

Post by yin nadie »

WEee-ee-l I can think of some applications more:

In a lot of strategy games, it can happen than a specific character can't be seen because it is behind a tree or a building. Having a little object over or under it that is always on top solves the problem easily. Another application are the 'flying numbers' I mentiones in a thread I posted just before this. It can also be used in selection GUIs, so the selected object appears on top, etc

Useaful feature, it is, but then ALL features can be useful, if used wisely
Post Reply