1GLPOLYGONOFFSET(3G)                                        GLPOLYGONOFFSET(3G)
2
3
4

NAME

6       glPolygonOffset  - set the scale and units used to calculate depth val‐
7       ues
8
9

C SPECIFICATION

11       void glPolygonOffset( GLfloat factor,
12                             GLfloat units )
13
14

PARAMETERS

16       factor  Specifies a scale factor that is  used  to  create  a  variable
17               depth offset for each polygon. The initial value is 0.
18
19       units   Is  multiplied  by an implementation-specific value to create a
20               constant depth offset. The initial value is 0.
21

DESCRIPTION

23       When      GL_POLYGON_OFFSET_FILL,      GL_POLYGON_OFFSET_LINE,       or
24       GL_POLYGON_OFFSET_POINT is enabled, each fragment's depth value will be
25       offset after it is interpolated from the depth values of the  appropri‐
26       ate  vertices.   The value of the offset is factor*DZ+r*units, where DZ
27       is a measurement of the change in depth relative to the screen area  of
28       the  polygon, and r is the smallest value that is guaranteed to produce
29       a resolvable offset for a given implementation.  The  offset  is  added
30       before the depth test is performed and before the value is written into
31       the depth buffer.
32
33       glPolygonOffset is useful for rendering hidden-line images, for  apply‐
34       ing  decals  to  surfaces,  and  for  rendering solids with highlighted
35       edges.
36

NOTES

38       glPolygonOffset is available only if the GL version is 1.1 or greater.
39
40       glPolygonOffset has no effect on depth coordinates placed in the  feed‐
41       back buffer.
42
43       glPolygonOffset has no effect on selection.
44

ERRORS

46       GL_INVALID_OPERATION   is  generated  if  glPolygonOffset  is  executed
47       between the execution of glBegin and  the  corresponding  execution  of
48       glEnd.
49

ASSOCIATED GETS

51       glIsEnabled         with        argument        GL_POLYGON_OFFSET_FILL,
52       GL_POLYGON_OFFSET_LINE, or GL_POLYGON_OFFSET_POINT.
53
54       glGet       with       argument       GL_POLYGON_OFFSET_FACTOR       or
55       GL_POLYGON_OFFSET_UNITS.
56

SEE ALSO

58       glDepthFunc(3G), glEnable(3G), glGet(3G), glIsEnabled(3G)
59
60
61
62                                                           GLPOLYGONOFFSET(3G)
Impressum