GLPOLYGONMODE(3G)
β¨ NAME β¨
okay so bestie, this is glPolygonMode from the 3G manual β yes, the GLPOLYGONMODE(3G) page π
β and it selects a polygon rasterization mode. That's the whole name vibe.
π C SPECIFICATION π
Here's the exact signature, no cap:
void glPolygonMode( GLenum face,
GLenum mode )
π PARAMETERS π
faceβ tells you which polygonsmodeapplies to. Must beGL_FRONTfor front-facing polygons,GL_BACKfor back-facing polygons, orGL_FRONT_AND_BACKfor front- and back-facing polygons. iconic little selector.modeβ tells you how polygons will be rasterized. Accepted values areGL_POINT,GL_LINE, andGL_FILL. The initial value isGL_FILLfor both front- and back-facing polygons. default behavior said hi.
πΈ DESCRIPTION πΈ
glPolygonMode controls the interpretation of polygons for rasterization. face describes which polygons mode applies to: front-facing polygons (GL_FRONT), back-facing polygons (GL_BACK), or both (GL_FRONT_AND_BACK). 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. periodt.
Three modes are defined and can be specified in mode:
GL_POINTβ polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such asGL_POINT_SIZEandGL_POINT_SMOOTHcontrol the rasterization of the points. Polygon rasterization attributes other thanGL_POLYGON_MODEhave no effect. dots!! little polygon freckles!!GL_LINEβ 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 (seeglLineStipple). Line attributes such asGL_LINE_WIDTHandGL_LINE_SMOOTHcontrol the rasterization of the lines. Polygon rasterization attributes other thanGL_POLYGON_MODEhave no effect. wireframe couture β¨GL_FILLβ the interior of the polygon is filled. Polygon attributes such asGL_POLYGON_STIPPLEandGL_POLYGON_SMOOTHcontrol the rasterization of the polygon. full-coverage moment.
π EXAMPLES π
To draw a surface with filled back-facing polygons and outlined front-facing polygons, call:
glPolygonMode(GL_FRONT, GL_LINE);
π¦ 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 glEdgeFlag. This is giving βthe GL has its own internals, bestieβ energy π«.
π₯ ERRORS π₯
GL_INVALID_ENUMis generated if eitherfaceormodeis not an accepted value. rude little enum situation.GL_INVALID_OPERATIONis generated ifglPolygonModeis executed between the execution ofglBeginand the corresponding execution ofglEnd. do NOT do this betweenglBeginandglEnd, bestie π.
π ASSOCIATED GETS π
glGetwith argumentGL_POLYGON_MODEβ that's the getter vibe. go get that polygon mode tea β
β SEE ALSO β
glBegin(3G)glEdgeFlag(3G)glLineStipple(3G)glLineWidth(3G)glPointSize(3G)glPolygonStipple(3G)
okay bye bestie β this has been GLPOLYGONMODE(3G), the footer vibe we got, from the 3G manual π. There wasn't a separate source/version/date line to hype up on the page, so consider this your cute sign-off: GLPOLYGONMODE(3G) energy, periodt πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms