summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/vtxfmt.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2012-11-19 11:17:39 -0800
committerJordan Justen <[email protected]>2012-12-16 15:30:27 -0800
commit0924f4e90c47d9e4d7255cd1375c651523c9b1c5 (patch)
tree2ba6b2188554f25c7c63c72d2a825634dd269a15 /src/mesa/main/vtxfmt.c
parentd44014953835e9180eeb54a7969470396d7f3fd0 (diff)
vbo: add _mesa_initialize_vbo_vtxfmt
This function initializes the exec/save dispatch tables for VBO vtxfmt. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/vtxfmt.c')
-rw-r--r--src/mesa/main/vtxfmt.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 674edb5e1cb..5f42b338d0e 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -36,6 +36,7 @@
#include "eval.h"
#include "dlist.h"
#include "main/dispatch.h"
+#include "vbo/vbo_context.h"
/**
@@ -262,3 +263,20 @@ _mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
if (_mesa_is_desktop_gl(ctx))
install_vtxfmt( ctx, ctx->Save, vfmt );
}
+
+
+/**
+ * Install VBO vtxfmt functions.
+ *
+ * This function depends on ctx->Version.
+ */
+void
+_mesa_initialize_vbo_vtxfmt(struct gl_context *ctx)
+{
+ struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+ _mesa_install_exec_vtxfmt(ctx, &exec->vtxfmt);
+ if (ctx->API == API_OPENGL_COMPAT) {
+ _mesa_install_save_vtxfmt(ctx, &ctx->ListState.ListVtxfmt);
+ }
+}
+