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.
13 bypass_vs_clip_and_viewport
14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 Whether the entire TCL pipeline should be bypassed. This implies that
17 vertices are pre-transformed for the viewport, and will not be run
18 through the vertex shader.
22 Implementations may still clip away vertices that are not in the viewport
28 If set, the provoking vertex of each polygon is used to determine the color
29 of the entire polygon. If not set, fragment colors will be interpolated
30 between the vertex colors.
32 The actual interpolated shading algorithm is obviously
33 implementation-dependent, but will usually be Gourard for most hardware.
37 This is separate from the fragment shader input attributes
38 CONSTANT, LINEAR and PERSPECTIVE. The flatshade state is needed at
39 clipping time to determine how to set the color of new vertices.
41 :ref:`Draw` can implement flat shading by copying the provoking vertex
42 color to all the other vertices in the primitive.
47 Whether the first vertex should be the provoking vertex, for most primitives.
48 If not set, the last vertex is the provoking vertex.
50 There are several important exceptions to the specification of this rule.
52 * ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
53 vertex. If the caller wishes to change the provoking vertex, they merely
54 need to rotate the vertices themselves.
55 * ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: This option has no
56 effect; the provoking vertex is always the last vertex.
57 * ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
58 second vertex, not the first. This permits each segment of the fan to have
65 If set, there are per-vertex back-facing colors. :ref:`Draw`
66 uses this state along with the front/back information to set the
67 final vertex colors prior to rasterization.
70 Indicates the window order of front-facing polygons, either
71 PIPE_WINDING_CW or PIPE_WINDING_CCW
74 Indicates which polygons to cull, either PIPE_WINDING_NONE (cull no
75 polygons), PIPE_WINDING_CW (cull clockwise-winding polygons),
76 PIPE_WINDING_CCW (cull counter clockwise-winding polygons), or
77 PIPE_WINDING_BOTH (cull all polygons).
80 Indicates how to fill clockwise polygons, either PIPE_POLYGON_MODE_FILL,
81 PIPE_POLYGON_MODE_LINE or PIPE_POLYGON_MODE_POINT.
83 Indicates how to fill counter clockwise polygons, either
84 PIPE_POLYGON_MODE_FILL, PIPE_POLYGON_MODE_LINE or PIPE_POLYGON_MODE_POINT.
87 Whether polygon stippling is enabled.
89 Controls OpenGL-style polygon smoothing/antialiasing
91 If set, clockwise polygons will have polygon offset factors applied
93 If set, counter clockwise polygons will have polygon offset factors applied
95 Specifies the polygon offset bias
97 Specifies the polygon offset scale
102 Whether lines should be smoothed. Line smoothing is simply anti-aliasing.
104 Whether line stippling is enabled.
106 16-bit bitfield of on/off flags, used to pattern the line stipple.
108 When drawing a stippled line, each bit in the stipple pattern is
109 repeated N times, where N = line_stipple_factor + 1.
111 Controls whether the last pixel in a line is drawn or not. OpenGL
112 omits the last pixel to avoid double-drawing pixels at the ends of lines
113 when drawing connected lines.
116 Whether points should be smoothed. Point smoothing turns rectangular
117 points into circles or ovals.
118 point_size_per_vertex
119 Whether vertices have a point size element.
121 The size of points, if not specified per-vertex.
123 The minimum size of points.
125 The maximum size of points.
127 Whether points are drawn as sprites (textured quads)
129 Specifies how the value for each shader output should be computed when
130 drawing sprites. If PIPE_SPRITE_COORD_NONE, don't change the vertex
131 shader output. Otherwise, the four vertices of the resulting quad will
132 be assigned texture coordinates. For PIPE_SPRITE_COORD_LOWER_LEFT, the
133 lower left vertex will have coordinate (0,0,0,1).
134 For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left vertex will have
135 coordinate (0,0,0,1).
136 This state is needed by :ref:`Draw` because that's where each
137 point vertex is converted into four quad vertices. There's no other
138 place to emit the new vertex texture coordinates which are required for
140 Note that when geometry shaders are available, this state could be
141 removed. A special geometry shader defined by the state tracker could
142 converts the incoming points into quads with the proper texture coords.
145 Whether the scissor test is enabled.
148 Whether :term:`MSAA` is enabled.
150 gl_rasterization_rules
151 Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
152 the rasterizer will use (0, 0) for pixel centers.