6 The rasterizer state controls the rendering of points, lines and triangles.
7 Attributes include polygon culling state, line width, line stipple,
8 multisample state, scissoring and flat/smooth shading.
14 bypass_vs_clip_and_viewport
15 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 Whether the entire TCL pipeline should be bypassed. This implies that
18 vertices are pre-transformed for the viewport, and will not be run
19 through the vertex shader.
23 Implementations may still clip away vertices that are not in the viewport
29 If set, the provoking vertex of each polygon is used to determine the color
30 of the entire polygon. If not set, fragment colors will be interpolated
31 between the vertex colors.
33 The actual interpolated shading algorithm is obviously
34 implementation-dependent, but will usually be Gourard for most hardware.
38 This is separate from the fragment shader input attributes
39 CONSTANT, LINEAR and PERSPECTIVE. The flatshade state is needed at
40 clipping time to determine how to set the color of new vertices.
42 :ref:`Draw` can implement flat shading by copying the provoking vertex
43 color to all the other vertices in the primitive.
48 Whether the first vertex should be the provoking vertex, for most primitives.
49 If not set, the last vertex is the provoking vertex.
51 There are several important exceptions to the specification of this rule.
53 * ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
54 vertex. If the caller wishes to change the provoking vertex, they merely
55 need to rotate the vertices themselves.
56 * ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: This option has no
57 effect; the provoking vertex is always the last vertex.
58 * ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
59 second vertex, not the first. This permits each segment of the fan to have
66 If set, there are per-vertex back-facing colors. The draw module
67 uses this state along with the front/back information to set the
68 final vertex colors prior to rasterization.
71 Indicates the window order of front-facing polygons, either
72 PIPE_WINDING_CW or PIPE_WINDING_CCW
75 Indicates which polygons to cull, either PIPE_WINDING_NONE (cull no
76 polygons), PIPE_WINDING_CW (cull clockwise-winding polygons),
77 PIPE_WINDING_CCW (cull counter clockwise-winding polygons), or
78 PIPE_WINDING_BOTH (cull all polygons).
81 Indicates how to fill clockwise polygons, either PIPE_POLYGON_MODE_FILL,
82 PIPE_POLYGON_MODE_LINE or PIPE_POLYGON_MODE_POINT.
84 Indicates how to fill counter clockwise polygons, either
85 PIPE_POLYGON_MODE_FILL, PIPE_POLYGON_MODE_LINE or PIPE_POLYGON_MODE_POINT.
88 Whether polygon stippling is enabled.
90 Controls OpenGL-style polygon smoothing/antialiasing
92 If set, clockwise polygons will have polygon offset factors applied
94 If set, counter clockwise polygons will have polygon offset factors applied
96 Specifies the polygon offset bias
98 Specifies the polygon offset scale
103 Whether lines should be smoothed. Line smoothing is simply anti-aliasing.
105 Whether line stippling is enabled.
107 16-bit bitfield of on/off flags, used to pattern the line stipple.
109 When drawinga stippled line, each bit in the stipple pattern is
110 repeated N times, where N = line_stipple_factor + 1.
112 Controls whether the last pixel in a line is drawn or not. OpenGL
113 omits the last pixel to avoid double-drawing pixels at the ends of lines
114 when drawing connected lines.
117 Whether points should be smoothed. Point smoothing turns rectangular
118 points into circles or ovals.
119 point_size_per_vertex
120 Whether vertices have a point size element.
122 The size of points, if not specified per-vertex.
124 The minimum size of points.
126 The maximum size of points.
128 Whether points are drawn as sprites (textured quads)
130 Specifies how the value for each shader output should be computed when
131 drawing sprites. If PIPE_SPRITE_COORD_NONE, don't change the vertex
132 shader output. Otherwise, the four vertices of the resulting quad will
133 be assigned texture coordinates. For PIPE_SPRITE_COORD_LOWER_LEFT, the
134 lower left vertex will have coordinate (0,0,0,1).
135 For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left vertex will have
136 coordinate (0,0,0,1).
137 This state is needed by the 'draw' module because that's where each
138 point vertex is converted into four quad vertices. There's no other
139 place to emit the new vertex texture coordinates which are required for
141 Note that when geometry shaders are available, this state could be
142 removed. A special geometry shader defined by the state tracker could
143 converts the incoming points into quads with the proper texture coords.
146 Whether the scissor test is enabled.
149 Whether :term:`MSAA` is enabled.
151 gl_rasterization_rules
152 Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
153 the rasterizer will use (0, 0) for pixel centers.