summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_split_copy.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-06 09:51:56 -0600
committerBrian Paul <[email protected]>2009-05-07 10:12:32 -0600
commit2369f14245222a9c073846baa1bb03e23aa37c15 (patch)
treeefe4956013d763c4052094e1530a991f5d83a65c /src/mesa/vbo/vbo_split_copy.c
parent74bec42b45910e2ff6bf1a8cc0eeb2bc5c705767 (diff)
mesa: in vbo split code, map buffers read-only, not write-only
And use GL_ELEMENT_ARRAY_BUFFER where appropriate.
Diffstat (limited to 'src/mesa/vbo/vbo_split_copy.c')
-rw-r--r--src/mesa/vbo/vbo_split_copy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index 5fb66d3318f..4fc0e36156c 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -389,8 +389,8 @@ static void replay_init( struct copy_context *copy )
if (vbo->Name && !vbo->Pointer)
ctx->Driver.MapBuffer(ctx,
- GL_ARRAY_BUFFER_ARB,
- GL_WRITE_ONLY, /* XXX */
+ GL_ARRAY_BUFFER,
+ GL_READ_ONLY,
vbo);
copy->varying[j].src_ptr = ADD_POINTERS(vbo->Pointer,
@@ -406,8 +406,8 @@ static void replay_init( struct copy_context *copy )
*/
if (copy->ib->obj->Name && !copy->ib->obj->Pointer)
ctx->Driver.MapBuffer(ctx,
- GL_ARRAY_BUFFER_ARB, /* XXX */
- GL_WRITE_ONLY, /* XXX */
+ GL_ELEMENT_ARRAY_BUFFER,
+ GL_READ_ONLY,
copy->ib->obj);
srcptr = (const GLubyte *)ADD_POINTERS(copy->ib->obj->Pointer, copy->ib->ptr);
@@ -509,14 +509,14 @@ static void replay_finish( struct copy_context *copy )
struct gl_buffer_object *vbo = copy->varying[i].array->BufferObj;
if (vbo->Name && vbo->Pointer)
- ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, vbo);
+ ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, vbo);
}
/* Unmap index buffer:
*/
if (copy->ib->obj->Name && copy->ib->obj->Pointer) {
ctx->Driver.UnmapBuffer(ctx,
- GL_ARRAY_BUFFER_ARB, /* XXX */
+ GL_ELEMENT_ARRAY_BUFFER,
copy->ib->obj);
}
}