diff options
author | Brian <[email protected]> | 2007-10-24 14:34:40 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-24 14:34:40 -0600 |
commit | 11ce6244a79106c592364b30434b6ddade3fd6bb (patch) | |
tree | cd46d9357503d6cbd32133f5b037ad569974d505 /src/mesa/state_tracker | |
parent | 3733b1f2e95642b47218604aee6a34eacb0c7293 (diff) |
Undo indexOffset change (I think, git???)
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index fbf7713f58d..50251a816b8 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -197,7 +197,7 @@ st_draw_vbo(GLcontext *ctx, /* indexed primitive */ struct gl_buffer_object *bufobj = ib->obj; struct pipe_buffer_handle *indexBuf = NULL; - unsigned indexSize, i; + unsigned indexSize, indexOffset, i; switch (ib->type) { case GL_UNSIGNED_INT: @@ -218,17 +218,19 @@ st_draw_vbo(GLcontext *ctx, /* elements/indexes are in a real VBO */ struct st_buffer_object *stobj = st_buffer_object(bufobj); winsys->buffer_reference(winsys, &indexBuf, stobj->buffer); + indexOffset = (unsigned) ib->ptr; } else { /* element/indicies are in user space memory */ indexBuf = winsys->user_buffer_create(winsys, (void *) ib->ptr, ib->count * indexSize); + indexOffset = 0; } /* draw */ for (i = 0; i < nr_prims; i++) { - pipe->draw_elements(pipe, indexBuf, indexSize, + pipe->draw_elements(pipe, indexBuf, indexSize, indexOffset, prims[i].mode, prims[i].start, prims[i].count); } |