title: Meaning and usage of the factor parameter in glPolygonOffset
body: <p>I am having difficulty understanding the meaning of the first parameter in <code>glPolygonOffset</code> function.</p>
  
  <pre><code>void glPolygonOffset(GLfloat  factor, GLfloat units);
  </code></pre>
  
  <p><a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml">The official documentation</a> says that factor</p>
  
  <blockquote>
    <p>Specifies a scale factor that is used to create a variable depth offset for each polygon.</p>
  </blockquote>
  
  <p>and that</p>
  
  <blockquote>
    <p>each fragment's depth value will be offset after it is interpolated from the depth values of the appropriate vertices. The value of the offset is factor × DZ + r × units , where DZ is a measurement of the change in depth relative to the screen area of the polygon, and r is the smallest value that is guaranteed to produce a resolvable offset for a given implementation.</p>
  </blockquote>
  
  <p>I understand what <code>r</code> and <code>unit</code> are. What I don't understand is what <code>DZ</code> is, i.e. what is meant by the "measurement of the change in depth value to the screen area of the polygon" and why would I ever need to set factor to anything other than 0. </p>
  
  <p>If i want my wireframe to be offset all I need is to add/substact a couple of units to/from the depth value, don't I? What's the meaning, purpose and usage example of the factor parameter (and the DZ mentioned in the document)?</p>