[gl2ps] GL2PS_POLYGON_OFFSET_FILL usage

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Feb 13 16:24:53 CET 2015


> On 09 Feb 2015, at 11:37, Pantxo Diribarne <pantxo.diribarne at gmail.com> wrote:
> 
> Hi,
> 
> I am currently trying to figure out how to use gl2psEnable/Disable with GL2PS_POLYGON_OFFSET_FILL flag. From the example using GL2PS_LINE_STIPPLE (in gl2psTest.c) I understand that I should Enable/Disable GL2PS_POLYGON_OFFSET_FILL each time I change the offset in my opengl scene. Am I correct?
> 
> If so, my concern is that reading gl2ps.c I am under the impression that only the last offset values of my scene will be taken into     account when finally parsing the feedback buffer. The "offset" field in the gl2pscontext is overwritten each time gl2psEnable is called. What do I miss?

Indeed, currently gl2psEnable(GL2PS_POLYGON_OFFSET_FILL) acts like an "on/off" switch for polygon offset; the actual values of the offset are fixed by the ones at the time of the last call...

Don't hesitate to send a patch if you decide to fix this.

Christophe

> 
> Thanks for your work,
> 
> Pantxo 
> _______________________________________________
> 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