1GLPOLYGONOFFSET(3G) OpenGL Manual GLPOLYGONOFFSET(3G)
2
3
4
6 glPolygonOffset - set the scale and units used to calculate depth
7 values
8
10 void glPolygonOffset(GLfloat factor, GLfloat units);
11
13 factor
14 Specifies a scale factor that is used to create a variable depth
15 offset for each polygon. The initial value is 0.
16
17 units
18 Is multiplied by an implementation-specific value to create a
19 constant depth offset. The initial value is 0.
20
22 When GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE, or
23 GL_POLYGON_OFFSET_POINT is enabled, each fragment's depth value will be
24 offset after it is interpolated from the depth values of the
25 appropriate vertices. The value of the offset is factor × DZ + r ×
26 units, where DZ is a measurement of the change in depth relative to the
27 screen area of the polygon, and r is the smallest value that is
28 guaranteed to produce a resolvable offset for a given implementation.
29 The offset is added before the depth test is performed and before the
30 value is written into the depth buffer.
31
32 glPolygonOffset is useful for rendering hidden-line images, for
33 applying decals to surfaces, and for rendering solids with highlighted
34 edges.
35
37 glIsEnabled() with argument GL_POLYGON_OFFSET_FILL,
38 GL_POLYGON_OFFSET_LINE, or GL_POLYGON_OFFSET_POINT.
39
40 glGet() with argument GL_POLYGON_OFFSET_FACTOR or
41 GL_POLYGON_OFFSET_UNITS.
42
44 glDepthFunc(), glEnable(), glGet(), glIsEnabled()
45
47 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
48 under the SGI Free Software B License. For details, see
49 http://oss.sgi.com/projects/FreeB/.
50
52 opengl.org
53
54
55
56opengl.org 06/10/2014 GLPOLYGONOFFSET(3G)