[gl2ps] Depth issues in GL2PS
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Sun Oct 14 15:22:36 CEST 2012
Hmm, weird. I would start by debugging what's actually in the feedback buffer (gl2psParseFeedbackBuffer) and see if the error is already there.
On 12 Oct 2012, at 23:23, David Lonie <david.lonie at kitware.com> wrote:
> Hi list,
>
> I'm using GL2PS to export a scene that is drawn in 2D, e.g. at
> constant Z in OpenGL.
>
> I've verified that z is the same for all vertices in the feedback
> buffer by watching gl2psGetVertex. In all cases, p[2] = 0.5.
>
> However, by the time the primitives are sorted, some of the vertices
> are at different depths. Most are at 0.0, but a few are at -20.0.
>
> This wasn't an issue for pure 2D scenes -- I just turned off sorting,
> and the primitives were rendered in painter order and everything
> worked great. Now we're trying to mix 2D painter rendering with 3D
> geometry, so we need to sort these guys, and the z=-20 vertices are
> throwing off the renderings.
>
> Any idea why some vertices are being transformed differently? I don't
> mind debugging/fixing this, but I'd greatly appreciate some pointers
> to likely culprits in the code.
>
> Somewhat related: I've had to add a stable sorting method to preserve
> the painter order for the 2D primitives. I'll send a patch for this
> once I get this other issue sorted out.
>
> Thanks in advance,
>
> Dave
>
> _______________________________________________
> gl2ps mailing list
> gl2ps at geuz.org
> http://www.geuz.org/mailman/listinfo/gl2ps
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine