NAME

glPolygonMode - select a polygon rasterization mode

C SPECIFICATION

void ggllPPoollyyggoonnMMooddee( GLenum _f_a_c_e,
                    GLenum _m_o_d_e )

PARAMETERS

_f_a_c_e
Specifies the polygons that _m_o_d_e applies to. Must be GGLL__FFRROONNTT for front-facing polygons, GGLL__BBAACCKK for back-facing polygons, or GGLL__FFRROONNTT__AANNDD__BBAACCKK for front- and back-facing polygons.
_m_o_d_e
Specifies how polygons will be rasterized. Accepted values are GGLL__PPOOIINNTT, GGLL__LLIINNEE, and GGLL__FFIILLLL. The initial value is GGLL__FFIILLLL for both front- and back-facing polygons.

DESCRIPTION

ggllPPoollyyggoonnMMooddee controls the interpretation of polygons for rasterization. _f_a_c_e describes which polygons _m_o_d_e applies to: front-facing polygons (GGLL__FFRROONNTT), back-facing polygons (GGLL__BBAACCKK), or both (GGLL__FFRROONNTT__AANNDD__BBAACCKK). The polygon mode affects only the final rasterization of polygons. In particular, a polygon's vertices are lit and the polygon is clipped and possibly culled before these modes are applied.

Three modes are defined and can be specified in _m_o_d_e:

GGLL__PPOOIINNTT
Polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such as GGLL__PPOOIINNTT__SSIIZZEE and GGLL__PPOOIINNTT__SSMMOOOOTTHH control the rasterization of the points. Polygon rasterization attributes other than GGLL__PPOOLLYYGGOONN__MMOODDEE have no effect.
GGLL__LLIINNEE
Boundary edges of the polygon are drawn as line segments. They are treated as connected line segments for line stippling; the line stipple counter and pattern are not reset between segments (see ggllLLiinneeSSttiippppllee). Line attributes such as GGLL__LLIINNEE__WWIIDDTTHH and GGLL__LLIINNEE__SSMMOOOOTTHH control the rasterization of the lines. Polygon rasterization attributes other than GGLL__PPOOLLYYGGOONN__MMOODDEE have no effect.
GGLL__FFIILLLL
The interior of the polygon is filled. Polygon attributes such as GGLL__PPOOLLYYGGOONN__SSTTIIPPPPLLEE and GGLL__PPOOLLYYGGOONN__SSMMOOOOTTHH control the rasterization of the polygon.

EXAMPLES

To draw a surface with filled back-facing polygons and outlined front-facing polygons, call glPolygonMode(GGLL__FFRROONNTT, GGLL__LLIINNEE);

NOTES

Vertices are marked as boundary or nonboundary with an edge flag. Edge flags are generated internally by the GL when it decomposes polygons; they can be set explicitly using ggllEEddggeeFFllaagg.

ERRORS

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if either _f_a_c_e or _m_o_d_e is not an accepted value.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllPPoollyyggoonnMMooddee is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeett with argument GGLL__PPOOLLYYGGOONN__MMOODDEE

SEE ALSO

ggllBBeeggiinn((33GG)), ggllEEddggeeFFllaagg((33GG)), ggllLLiinneeSSttiippppllee((33GG)), ggllLLiinneeWWiiddtthh((33GG)), ggllPPooiinnttSSiizzee((33GG)), ggllPPoollyyggoonnSSttiippppllee((33GG))