/**
- * Plug in the primitive rendering/rasterization stage.
+ * Plug in the primitive rendering/rasterization stage (which is the last
+ * stage in the drawing pipeline).
* This is provided by the device driver.
*/
void draw_set_rasterize_stage( struct draw_context *draw,
*/
void draw_alloc_tmps( struct draw_stage *stage, unsigned nr )
{
+ assert(!stage->tmp);
+
stage->nr_tmps = nr;
if (nr) {
}
/**
- * Reset the verticies ids of this and subsequent stages.
+ * Reset the vertex ids for the stage's temp verts.
*/
void draw_reset_tmps( struct draw_stage *stage )
{
if (stage->tmp) {
FREE( stage->tmp[0] );
FREE( stage->tmp );
+ stage->tmp = NULL;
}
}
struct draw_stage *next; /**< next stage in pipeline */
- struct vertex_header **tmp;
+ struct vertex_header **tmp; /**< temp vert storage, such as for clipping */
unsigned nr_tmps;
void (*begin)( struct draw_stage * );
void (*end)( struct draw_stage * );
/**
- * Reset temporary vertices ids in this stage
+ * Reset temporary vertex ids in this stage
*
* draw_free_tmps will be called instead if null.
*/