'\" e '\"! eqn | mmdoc '\"macro stdmacro .ds Vn Version 1.2 .ds Dt 24 September 1999 .ds Re Release 1.2.1 .ds Dp Jan 14 18:30 .ds Dm 01 polygonof .ds Xs 10762 4 polygonoffset.gl .TH GLPOLYGONOFFSET 3G .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_FILL\fP, \%\f3GL_POLYGON_OFFSET_LINE\fP, or \%\f3GL_POLYGON_OFFSET_POINT\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. .bp .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(3G)\fP, \%\f3glEnable(3G)\fP, \%\f3glGet(3G)\fP, \%\f3glIsEnabled(3G)\fP