Move initialization of default ctx->Driver.buffer-object-functions into

bufferobj.c so all the drivers don't have to worry about them.
This commit is contained in:
Brian Paul
2003-10-19 15:10:36 +00:00
parent 2bd4b68c5e
commit 0f85b91c8a
3 changed files with 12 additions and 22 deletions

View File

@@ -347,6 +347,18 @@ _mesa_init_buffer_objects( GLcontext *ctx )
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
ctx->Array.VertexAttrib[i].BufferObj = ctx->Array.NullBufferObj;
}
/* Device drivers might override these assignments after the Mesa
* context is initialized.
*/
ctx->Driver.NewBufferObject = _mesa_new_buffer_object;
ctx->Driver.DeleteBuffer = _mesa_delete_buffer_object;
ctx->Driver.BindBuffer = NULL;
ctx->Driver.BufferData = _mesa_buffer_data;
ctx->Driver.BufferSubData = _mesa_buffer_subdata;
ctx->Driver.GetBufferSubData = _mesa_buffer_get_subdata;
ctx->Driver.MapBuffer = _mesa_buffer_map;
ctx->Driver.UnmapBuffer = NULL;
}