summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_api.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-09-26 14:09:04 +0100
committerKeith Whitwell <[email protected]>2008-09-26 14:09:04 +0100
commitfb8db63a89c4ac7fbbbc0912e1dde0871ae9c35c (patch)
tree3d6f43bc2b9bc977216e0d8b67ea9976854d3c8c /src/mesa/vbo/vbo_exec_api.c
parentbb6a69d1696cacf828a3de21bc57678c0e4aa54a (diff)
parent1e3a44fab068f00378613456036716d0c3772969 (diff)
Merge commit 'origin/master' into HEAD
Conflicts: src/mesa/vbo/vbo.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_exec_draw.c
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index d70b4bb1a11..fdb0c5a9a4d 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -700,8 +700,8 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
&exec->vtx.bufferobj,
ctx->Array.NullBufferObj);
+ ASSERT(!exec->vtx.buffer_map);
exec->vtx.buffer_map = ALIGN_MALLOC(VBO_VERT_BUFFER_SIZE * sizeof(GLfloat), 64);
-
vbo_exec_vtxfmt_init( exec );
/* Hook our functions into the dispatch table.
@@ -726,13 +726,13 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
{
- GLcontext *ctx = exec->ctx;
if (exec->vtx.bufferobj->Name) {
- ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, exec->vtx.bufferobj);
- ctx->Driver.DeleteBuffer(ctx, exec->vtx.bufferobj);
- exec->vtx.bufferobj = NULL;
+ /* using a real VBO for vertex data */
+ GLcontext *ctx = exec->ctx;
+ _mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
}
else {
+ /* just using malloc'd space for vertex data */
if (exec->vtx.buffer_map) {
ALIGN_FREE(exec->vtx.buffer_map);
exec->vtx.buffer_map = NULL;