summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-10-19 15:10:36 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-10-19 15:10:36 +0000
commit0f85b91c8ace21c25329b455e041bb39218c812f (patch)
tree791b184d3ef780768a642f411171e9a6f530efc3 /src/mesa/main
parent2bd4b68c5ec6a302a839043cda25513552a09b6e (diff)
Move initialization of default ctx->Driver.buffer-object-functions into
bufferobj.c so all the drivers don't have to worry about them.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/bufferobj.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 17ea49b61f..04107928e3 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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;
}