1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 08:35:52 +00:00
QB64-PE/internal/help/_glPolygonMode.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

62 lines
2.6 KiB
Plaintext

'''_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}}, {{KW|_GL_LINE}}, and {{KW|_GL_FILL}}. The initial value is {{KW|_GL_FILL}} for both front- and back-facing polygons.
{{PageDescription}}
'''_glPolygonMode''' controls the interpretation of polygons for rasterization. {{Parameter|face}} describes which polygons {{Parameter|mode}} applies to: both front and back-facing polygons ({{KW|_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.
Three modes are defined and can be specified in {{Parameter|mode}}:
; {{KW|_GL_POINT}}
: Polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such as {{KW|_GL_POINT_SIZE}} and {{KW|_GL_POINT_SMOOTH}} control the rasterization of the points. Polygon rasterization attributes other than {{KW|_GL_POLYGON_MODE}} have no effect.
; {{KW|_GL_LINE}}
: Boundary edges of the polygon are drawn as line segments. Line attributes such as {{KW|_GL_LINE_WIDTH}} and {{KW|_GL_LINE_SMOOTH}} control the rasterization of the lines. Polygon rasterization attributes other than {{KW|_GL_POLYGON_MODE}} have no effect.
; {{KW|_GL_FILL}}
: The interior of the polygon is filled. Polygon attributes such as {{KW|_GL_POLYGON_SMOOTH}} control the rasterization of the polygon.
== Examples ==
To draw a surface with outlined polygons, call
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;
glPolygonMode(, );
&amp;lt;/source&amp;gt;
{{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.
{{PageErrors}}
{{KW|_GL_INVALID_ENUM}} is generated if either {{Parameter|face}} or {{Parameter|mode}} is not an accepted value.
{{PageUseWith}}
{{KW|_glGet}} with argument {{KW|_GL_POLYGON_MODE}}
{{PageSeeAlso}}
{{KW|_GL}}
{{KW|_glLineWidth}}, {{KW|_glPointSize}}
{{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/ http://oss.sgi.com/projects/FreeB/].