Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ glPolygonOffsetEXT(3gl) — Powerstorm 4D 5.0B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GLPOLYGONOFFSETEXT()

NAME

glPolygonOffsetEXT − set the scale and bias used to calculate z values
 

C SPECIFICATION

void glPolygonOffsetEXT( GLfloat factor,

GLfloat bias )

 

PARAMETERS

factor specifies a scale factor which is used to create a variable
offset for each polygon.

bias specifies a constant which is added to each polygon’s
z offset. 
 

DESCRIPTION

When GL_POLYGON_OFFSET_EXT is enabled, each fragment’s z value will be offset after it is interpolated from the z values of the appropriate vertices.  The value of the offset isfactor ~∗~ DZ ~~+~~ bias, whereDZ is a measurement of the change in z relative to the screen area of the polygon.  The offset is added before the Depth Test is performed and before the value is written into the Depth Buffer. 

Initially GL_POLYGON_OFFSET_FACTOR_EXT and GL_POLYGON_OFFSET_BIAS_EXT  are both set to 0.0. 

This is useful for rendering hidden line images, for applying decals to surfaces, and for rendering solids with highlighted edges. 

NOTES

glPolygonOffsetEXT is part of the EXT_polygon_offset extension, not part of the core GL command set.  If GL_EXT_polygon_offset is included in the string returned by glGetString, when called with argument GL_EXTENSIONS, extension EXT_polygon_offset is supported by the connection. 

ERRORS

GL_INVALID_OPERATION is generated if glPolygonOffsetEXT is executed between the execution of glBegin and the corresponding execution of glEnd. 

ASSOCIATED GETS

glIsEnabled with argument GL_POLYGON_OFFSET_EXT
glGet with argument GL_POLYGON_OFFSET_FACTOR_EXT or GL_POLYGON_OFFSET_BIAS_EXT. 

SEE ALSO

glDepthFunc, glDisable, glEnable, glGet, glIsEnabled, glLineWidth, glStencilOp, glTexEnv. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026