[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glPolygonOffsetEXT Subroutine

Purpose

Sets the scale and bias used to calculate z values.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glPolygonOffsetEXT(GLfloat factor, 
               GLfloat bias)

Parameters

factor specifies a scale factor which is used to create a 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 is factor * DZ + bias, where DZ 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 .

File

/usr/include/GL/glext.h Contains extensions to C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glDepthFunc subroutine, glEnable orglDisable subroutine, glGet subroutine, glIsEnabled subroutine, glLineWidth subroutine, glStencilOp subroutine, glTexEnv subroutine.


[ Previous | Next | Contents | Glossary | Home | Search ]