GlPolygonMode

From QB64 Phoenix Edition Wiki
Revision as of 06:06, 1 May 2022 by SMcNeill (talk | contribs) (Created page with "'''_glPolygonMode:''' select a polygon rasterization mode {{PageSyntax}} SUB _glPolygonMode (BYVAL face AS _UNSIGNED LONG, BYVAL mode AS _UNSIGNED LONG) void '''_glPolygonMode'''(GLenum {{Parameter|face}}, GLenum {{Parameter|mode}}); ; face : Specifies the polygons that {{Parameter|mode}} applies to. Must be {{KW|_GL_FRONT_AND_BACK}} for front- and back-facing polygons. ; mode : Specifies how polygons will be rasterized. Accepted values are {{KW|_GL_POINT}}, {{K...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

_glPolygonMode: select a polygon rasterization mode


Syntax

 SUB _glPolygonMode (BYVAL face AS _UNSIGNED LONG, BYVAL mode AS _UNSIGNED LONG)
 void _glPolygonMode(GLenum face, GLenum mode);


face
Specifies the polygons that mode applies to. Must be Template:KW for front- and back-facing polygons.
mode
Specifies how polygons will be rasterized. Accepted values are Template:KW, Template:KW, and Template:KW. The initial value is Template:KW for both front- and back-facing polygons.


Description

_glPolygonMode controls the interpretation of polygons for rasterization. face describes which polygons mode applies to: both front and back-facing polygons (Template:KW). 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 mode:

Template:KW
Polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such as Template:KW and Template:KW control the rasterization of the points. Polygon rasterization attributes other than Template:KW have no effect.
Template:KW
Boundary edges of the polygon are drawn as line segments. Line attributes such as Template:KW and Template:KW control the rasterization of the lines. Polygon rasterization attributes other than Template:KW have no effect.
Template:KW
The interior of the polygon is filled. Polygon attributes such as Template:KW control the rasterization of the polygon.

Examples

To draw a surface with outlined polygons, call

<source lang="cpp">

glPolygonMode(, );

</source>


Template:PageNotes

Vertices are marked as boundary or nonboundary with an edge flag. Edge flags are generated internally by the GL when it decomposes triangle stips and fans.


Template:PageErrors

Template:KW is generated if either face or mode is not an accepted value.


Template:PageUseWith

Template:KW with argument Template:KW


See also

SUB _GL Template:KW, Template:KW


Template:PageCopyright

Copyright 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.