[gl2ps] Keeping track of GL_DEPTH_TEST + maybe a bug

Sergi Diaz sergi at mcneel.com
Mon Aug 27 08:52:26 CEST 2007


Hi Michael,

I encountered the same problem while drawing hidden lines in my program
(they always get drawn no matter what). GL2PS keeping track of this would be
sweet, but meanwhile I found a workaround that should work for you too.

You can use glDepthRange to produce the same effect. Just draw everything
except the text using glDepthRange(0.1, 1) and draw the text with
glDepthRange(0, 0.09). You can even switch from oneto the other back and
forth.

Regards,

--
Sergi Diaz
Penguin Development Team
McNeel Europe
www.penguin3d.com
www.rhino3d.com


----------------------------------------------------------------------

Message: 1
Date: Thu, 23 Aug 2007 14:59:33 +0200
From: "Michael Goffioul" <michael.goffioul at gmail.com>
Subject: [gl2ps] Keeping track of GL_DEPTH_TEST + maybe a bug
To: "Christophe Geuzaine" <cgeuzaine at ulg.ac.be>, gl2ps at geuz.org
Message-ID:
	<128f38bd0708230559r39e0de9bw6ff4233cca3c8cb5 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have 2 small questions:

1) would it be hard for GL2PS to keep track of the current GL_DEPTH_TEST
state and sort the primitives accordingly? In my code, I draw some text that
I locate in world coordinate, but I disable GL_DEPTH_TEST to have it on
top of the complete viewport. In GL2PS, the text is still sorted
according to its
depth and partially hidden by some other primitives.

2) in gl2psDivideQuad function, I noticed that (*t2)->boundary is not
assigned,
while (*t1)->boundary is assigned twice. Might this be a bug? (I have no
idea
about the potential effect, I just noticed it while looking for something
else)

Michael.