'\"! eqn | mmdoc '\"macro stdmacro .ds Vn Version 1.2 .ds Dt 6 March 1997 .ds Re Release 1.1.0 .ds Dp Mar 17 18:08 .ds Dm Mar 6 20:0 .ds Xs 43735 4 polygonoffset.gl .TH GLPOLYGONOFFSET .SH NAME .B "glPolygonOffset \- set the scale and units used to calculate depth values .SH C SPECIFICATION void \f3glPolygonOffset\fP( GLfloat \fIfactor\fP, .nf .ta \w'\f3void \fPglPolygonOffset( 'u GLfloat \fIunits\fP ) .fi .EQ delim $$ .EN .SH PARAMETERS .TP \w'\f2factor\fP\ \ 'u \f2factor\fP Specifies a scale factor that is used to create a variable depth offset for each polygon. The initial value is 0. .TP \f2units\fP Is multiplied by an implementation-specific value to create a constant depth offset. The initial value is 0. .SH DESCRIPTION When \f3GL_POLYGON_OFFSET\fP is enabled, each fragment's \f2depth\fP value will be offset after it is interpolated from the \f2depth\fP 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. The offset is added before the depth test is performed and before the value is written into the depth buffer. .P \f3glPolygonOffset\fP is useful for rendering hidden-line images, for applying decals to surfaces, and for rendering solids with highlighted edges. .SH NOTES \f3glPolygonOffset\fP is available only if the GL version is 1.1 or greater. .P \f3glPolygonOffset\fP has no effect on depth coordinates placed in the feedback buffer. .P \f3glPolygonOffset\fP has no effect on selection. .SH ERRORS \f3GL_INVALID_OPERATION\fP is generated if \f3glPolygonOffset\fP is executed between the execution of \f3glBegin\fP and the corresponding execution of \f3glEnd\fP. .SH ASSOCIATED GETS \f3glIsEnabled\fP with argument \f3GL_POLYGON_OFFSET_FILL\fP, \f3GL_POLYGON_OFFSET_LINE\fP, or \f3GL_POLYGON_OFFSET_POINT\fP. .P \f3glGet\fP with argument \f3GL_POLYGON_OFFSET_FACTOR\fP or \f3GL_POLYGON_OFFSET_UNITS\fP. .SH SEE ALSO \f3glDepthFunc\fP, \f3glDisable\fP, \f3glEnable\fP, \f3glGet\fP, \f3glIsEnabled\fP, \f3glLineWidth\fP, \f3glStencilOp\fP, \f3glTexEnv\fP