summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_draw.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-15 13:25:13 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-15 13:25:13 -0600
commit520ad5f854723955c89584e4fa0bd172d0969e09 (patch)
treebc57abc23935be82bc20a7df1ef79e92aa1fec10 /src/mesa/state_tracker/st_draw.c
parent230225c5d746e4f62d71dda8c2832cc25eb28afe (diff)
GL_SELECT mode works now
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r--src/mesa/state_tracker/st_draw.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 640fa8263e..7fcc4d8e65 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -336,6 +336,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
struct pipe_buffer_handle *index_buffer_handle = 0;
struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
GLuint attr, i;
+ ubyte *mapped_constants;
assert(ctx->RenderMode == GL_SELECT ||
ctx->RenderMode == GL_FEEDBACK);
@@ -439,6 +440,17 @@ st_feedback_draw_vbo(GLcontext *ctx,
PIPE_BUFFER_FLAG_READ);
draw_set_mapped_element_buffer(draw, indexSize, map);
}
+ else {
+ /* no index/element buffer */
+ draw_set_mapped_element_buffer(draw, 0, NULL);
+ }
+
+
+ /* map constant buffers */
+ mapped_constants = winsys->buffer_map(winsys,
+ st->state.constants[PIPE_SHADER_VERTEX].buffer,
+ PIPE_BUFFER_FLAG_READ);
+ draw_set_mapped_constant_buffer(st->draw, mapped_constants);
/* draw here */
@@ -447,6 +459,9 @@ st_feedback_draw_vbo(GLcontext *ctx,
}
+ /* unmap constant buffers */
+ winsys->buffer_unmap(winsys, st->state.constants[PIPE_SHADER_VERTEX].buffer);
+
/*
* unmap vertex/index buffers
*/