<div dir="ltr"><div><div><div><div>Hi,<br><br></div>I attached a patch that fixes the issue of only having access to the last set values for polygon_offset. The changes are as follows:<br>* I replaced the "offset" field of the gl2ps structure with 2 fields (ounits and ofactor) in the GL2PSprimitive structure,<br></div>* I used the same scheme as GL2PS_LINE_STIPPLE to store the values of the offset factor and units in the feedback buffer,<br></div>* I added an example of the usage in gl2psTestSimple.c.<br><br></div><div>Hope this helps,<br><br></div><div>Pantxo<br></div><div><br><br></div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-15 11:25 GMT+01:00 Pantxo Diribarne <span dir="ltr"><<a href="mailto:pantxo.diribarne@gmail.com" target="_blank">pantxo.diribarne@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>Thanks for your answer. I am no OpenGl expert (my initial interest was to solve a bug in Octave [1]) but I'll try to provide a patch. I may be a bit to optimistic but I am under the impression that it's just a matter of copying the way line stipple stores values in the feedback buffer. <br><br></div>Pantxo<br><br>[1] <span><a href="http://savannah.gnu.org/bugs/?44111" target="_blank">http://savannah.gnu.org/bugs/?44111</a></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-02-13 16:24 GMT+01:00 Christophe Geuzaine <span dir="ltr"><<a href="mailto:cgeuzaine@ulg.ac.be" target="_blank">cgeuzaine@ulg.ac.be</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br>
> On 09 Feb 2015, at 11:37, Pantxo Diribarne <<a href="mailto:pantxo.diribarne@gmail.com" target="_blank">pantxo.diribarne@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> 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?<br>
><br>
> 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?<br>
<br>
</div></div>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...<br>
<br>
Don't hesitate to send a patch if you decide to fix this.<br>
<br>
Christophe<br>
<span><br>
><br>
> Thanks for your work,<br>
><br>
> Pantxo<br>
</span>> _______________________________________________<br>
> gl2ps mailing list<br>
> <a href="mailto:gl2ps@geuz.org" target="_blank">gl2ps@geuz.org</a><br>
> <a href="http://www.geuz.org/mailman/listinfo/gl2ps" target="_blank">http://www.geuz.org/mailman/listinfo/gl2ps</a><br>
<span><font color="#888888"><br>
--<br>
Prof. Christophe Geuzaine<br>
University of Liege, Electrical Engineering and Computer Science<br>
<a href="http://www.montefiore.ulg.ac.be/~geuzaine" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>