diff options
author | Brian <[email protected]> | 2007-09-10 16:29:23 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-09-10 16:29:23 -0600 |
commit | d56a3adc30c19c8f00cb7dc585e86babfd3a79a7 (patch) | |
tree | 38004b2d716a1383978ceca10ff5f93084d1a03b /src/mesa/pipe/draw/draw_context.c | |
parent | b2dfe2be6cc91c330e7fe21ea663cacfc220582d (diff) |
More work on vertex feedback / glRasterPos. Basic rasterpos works now.
Diffstat (limited to 'src/mesa/pipe/draw/draw_context.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_context.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 3c095810e55..4498293e92b 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -48,6 +48,7 @@ struct draw_context *draw_create( void ) draw->pipeline.clip = draw_clip_stage( draw ); draw->pipeline.flatshade = draw_flatshade_stage( draw ); draw->pipeline.cull = draw_cull_stage( draw ); + draw->pipeline.feedback = draw_feedback_stage( draw ); ASSIGN_4V( draw->plane[0], -1, 0, 0, 1 ); ASSIGN_4V( draw->plane[1], 1, 0, 0, 1 ); @@ -147,6 +148,14 @@ static void validate_pipeline( struct draw_context *draw ) } +void draw_set_feedback_state( struct draw_context *draw, + const struct pipe_feedback_state *feedback ) +{ + draw->feedback = *feedback; + validate_pipeline( draw ); +} + + /** * Register new primitive setup/rendering state. * This causes the drawing pipeline to be rebuilt. @@ -245,6 +254,7 @@ void draw_set_mapped_feedback_buffer(struct draw_context *draw, uint index, void *buffer, uint size) { + assert(index < PIPE_MAX_FEEDBACK_ATTRIBS); draw->mapped_feedback_buffer[index] = buffer; draw->mapped_feedback_buffer_size[index] = size; /* in bytes */ } |