'\" t .\" Title: glPolygonOffset .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/08/2011 .\" Manual: OpenGL 3.3 .\" Source: OpenGL 3.3 .\" Language: English .\" .TH "GLPOLYGONOFFSET" "3G" "03/08/2011" "OpenGL 3.3" "OpenGL 3\&.3" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glPolygonOffset \- set the scale and units used to calculate depth values .SH "C SPECIFICATION" .HP \w'void\ glPolygonOffset('u .BI "void glPolygonOffset(GLfloat\ " "factor" ", GLfloat\ " "units" ");" .SH "PARAMETERS" .PP \fIfactor\fR .RS 4 Specifies a scale factor that is used to create a variable depth offset for each polygon\&. The initial value is 0\&. .RE .PP \fIunits\fR .RS 4 Is multiplied by an implementation\-specific value to create a constant depth offset\&. The initial value is 0\&. .RE .SH "DESCRIPTION" .PP When \fBGL_POLYGON_OFFSET_FILL\fR, \fBGL_POLYGON_OFFSET_LINE\fR, or \fBGL_POLYGON_OFFSET_POINT\fR is enabled, each fragment\*(Aqs \fIdepth\fR value will be offset after it is interpolated from the \fIdepth\fR values of the appropriate vertices\&. The value of the offset is factor \(mu DZ + r \(mu 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\&. .PP \fBglPolygonOffset\fR is useful for rendering hidden\-line images, for applying decals to surfaces, and for rendering solids with highlighted edges\&. .SH "ASSOCIATED GETS" .PP \fBglIsEnabled\fR() with argument \fBGL_POLYGON_OFFSET_FILL\fR, \fBGL_POLYGON_OFFSET_LINE\fR, or \fBGL_POLYGON_OFFSET_POINT\fR\&. .PP \fBglGet\fR() with argument \fBGL_POLYGON_OFFSET_FACTOR\fR or \fBGL_POLYGON_OFFSET_UNITS\fR\&. .SH "SEE ALSO" .PP \fBglDepthFunc\fR(), \fBglEnable\fR(), \fBglGet\fR(), \fBglIsEnabled\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&.