[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: OpenGL orthographic projection



Gregor Mückl wrote:

Yes, GL_DEPTH_TEST is still turned on. Thanks for pointing that one out.
However, I have only a limited set of fixed geometry with a distance from the camera which is larger than that of the mouse cursor. Unless the contents of the z buffer could change its meaning radically when switiching projection matrix this should not be a problem.
The problem is that the contents DON'T change - but the MEANING applied to those
contents changes drastically.

I understand that the z buffer layout depends on the near and far clilpping plane distance in projection mode, so I don't know how the graphics card will actually behave with respect to the z buffer.
...and that is precisely the reason you need to disable the depth test whilst
rendering this kind of overlay stuff.  It's hard to figure out what's going to
happen - and you certainly wouldn't want to guarantee that nothing would go wrong.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
           http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----