Home | History | Annotate | Download | only in draw

Lines Matching refs:stage

29  * \brief  Drawing stage for handling glPolygonMode(line/point).
43 struct draw_stage stage;
53 static INLINE struct unfilled_stage *unfilled_stage( struct draw_stage *stage )
55 return (struct unfilled_stage *)stage;
60 static void point( struct draw_stage *stage,
65 stage->next->point( stage->next, &tmp );
68 static void line( struct draw_stage *stage,
75 stage->next->line( stage->next, &tmp );
79 static void points( struct draw_stage *stage,
86 if ((header->flags & DRAW_PIPE_EDGE_FLAG_0) && v0->edgeflag) point( stage, v0 );
87 if ((header->flags & DRAW_PIPE_EDGE_FLAG_1) && v1->edgeflag) point( stage, v1 );
88 if ((header->flags & DRAW_PIPE_EDGE_FLAG_2) && v2->edgeflag) point( stage, v2 );
92 static void lines( struct draw_stage *stage,
100 stage->next->reset_stipple_counter( stage->next );
102 if ((header->flags & DRAW_PIPE_EDGE_FLAG_2) && v2->edgeflag) line( stage, v2, v0 );
103 if ((header->flags & DRAW_PIPE_EDGE_FLAG_0) && v0->edgeflag) line( stage, v0, v1 );
104 if ((header->flags & DRAW_PIPE_EDGE_FLAG_1) && v1->edgeflag) line( stage, v1, v2 );
133 static void unfilled_tri( struct draw_stage *stage,
136 struct unfilled_stage *unfilled = unfilled_stage(stage);
145 stage->next->tri( stage->next, header );
148 lines( stage, header );
151 points( stage, header );
159 static void unfilled_first_tri( struct draw_stage *stage,
162 struct unfilled_stage *unfilled = unfilled_stage(stage);
163 const struct pipe_rasterizer_state *rast = stage->draw->rasterizer;
168 stage->tri = unfilled_tri;
169 stage->tri( stage, header );
174 static void unfilled_flush( struct draw_stage *stage,
177 stage->next->flush( stage->next, flags );
179 stage->tri = unfilled_first_tri;
183 static void unfilled_reset_stipple_counter( struct draw_stage *stage )
185 stage->next->reset_stipple_counter( stage->next );
189 static void unfilled_destroy( struct draw_stage *stage )
191 draw_free_temp_verts( stage );
192 FREE( stage );
197 * Create unfilled triangle stage.
205 unfilled->stage.draw = draw;
206 unfilled->stage.name = "unfilled";
207 unfilled->stage.next = NULL;
208 unfilled->stage.tmp = NULL;
209 unfilled->stage.point = draw_pipe_passthrough_point;
210 unfilled->stage.line = draw_pipe_passthrough_line;
211 unfilled->stage.tri = unfilled_first_tri;
212 unfilled->stage.flush = unfilled_flush;
213 unfilled->stage.reset_stipple_counter = unfilled_reset_stipple_counter;
214 unfilled->stage.destroy = unfilled_destroy;
216 if (!draw_alloc_temp_verts( &unfilled->stage, 0 ))
219 return &unfilled->stage;
223 unfilled->stage.destroy( &unfilled->stage );