[gl2ps] Problem with linewidth and viewport

Michael Goffioul michael.goffioul at gmail.com
Mon Aug 20 15:18:28 CEST 2007


Hi,

I'm trying to use GL2PS in my project, but faced a problem with linewidth
restoration after a gl2psEndViewport. All my lines are 0.5 wide and I issue
glLineWidth(0.5) as well as gl2psLineWidth(0.5). This works fine for the first
viewport. After gl2psEndViewport call, I see the "grestore" code in
the generated
PS, which somehow reset the line width to 1.0. However, the OpenGL as well
as GL2PS state is not changed: they both cache the previous 0.5 value, such
that no further linewidth settings is produced in the PS code.

This happens with gl2ps-1.3.2.

Is there a way to workaround that?
Thanks.

Michael.