GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLPOLYGONMODE

GLPOLYGONMODE

Index
 

NAME

glPolygonMode - select a polygon rasterization mode

 

C SPECIFICATION

void f3glPolygonModefP( GLenum fIfacefP,
f2facefP
Specifies the polygons that f2modefP applies to.
Must be
%f3GL_FRONTfP for front-facing polygons,
%f3GL_BACKfP for back-facing polygons,
or %f3GL_FRONT_AND_BACKfP for front- and back-facing polygons.
f2modefP
Specifies how polygons will be rasterized. Accepted values are %f3GL_POINTfP, %f3GL_LINEfP, and %f3GL_FILLfP. The initial value is %f3GL_FILLfP for both front- and back-facing polygons.
 

DESCRIPTION

%f3glPolygonModefP controls the interpretation of polygons for rasterization. f2facefP describes which polygons f2modefP applies to: front-facing polygons (%f3GL_FRONTfP), back-facing polygons (%f3GL_BACKfP), or both (%f3GL_FRONT_AND_BACKfP). 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 f2modefP:
%f3GL_POINTfP
Polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such as %f3GL_POINT_SIZEfP and %f3GL_POINT_SMOOTHfP control the rasterization of the points. Polygon rasterization attributes other than %f3GL_POLYGON_MODEfP have no effect.
%f3GL_LINEfP
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 %f3glLineStipplefP). Line attributes such as %f3GL_LINE_WIDTHfP and %f3GL_LINE_SMOOTHfP control the rasterization of the lines. Polygon rasterization attributes other than %f3GL_POLYGON_MODEfP have no effect.
%f3GL_FILLfP
The interior of the polygon is filled. Polygon attributes such as %f3GL_POLYGON_STIPPLEfP and %f3GL_POLYGON_SMOOTHfP control the rasterization of the polygon.
 

EXAMPLES

To draw a surface with filled back-facing polygons and outlined front-facing polygons, call glPolygonMode(%f3GL_FRONTfP, %f3GL_LINEfP);  

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 %f3glEdgeFlagfP.  

ERRORS

%f3GL_INVALID_ENUMfP is generated if either f2facefP or f2modefP is not an accepted value. %f3GL_INVALID_OPERATIONfP is generated if %f3glPolygonModefP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.  

ASSOCIATED GETS

%f3glGetfP with argument %f3GL_POLYGON_MODEfP  

SEE ALSO

%f3glBegin(3G)fP, %f3glEdgeFlag(3G)fP, %f3glLineStipple(3G)fP, %f3glLineWidth(3G)fP, %f3glPointSize(3G)fP, %f3glPolygonStipple(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
EXAMPLES
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO