aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/vtxfmt.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-17 12:16:30 +0100
committermarha <marha@users.sourceforge.net>2012-12-17 12:16:30 +0100
commitb3f7d4f6ce0d42d826f384223144936ba6797a10 (patch)
tree2f329beffff890b402625bff8547e243071c47bd /mesalib/src/mesa/main/vtxfmt.c
parentc648afe73ef43a15094508d2dd439e05738735bf (diff)
parent840c8745518b92303d40f6834e9c616587242231 (diff)
downloadvcxsrv-b3f7d4f6ce0d42d826f384223144936ba6797a10.tar.gz
vcxsrv-b3f7d4f6ce0d42d826f384223144936ba6797a10.tar.bz2
vcxsrv-b3f7d4f6ce0d42d826f384223144936ba6797a10.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libXft pixman mesa git update 17 dec 2012 Conflicts: mesalib/src/mesa/drivers/dri/swrast/swrast.c
Diffstat (limited to 'mesalib/src/mesa/main/vtxfmt.c')
-rw-r--r--mesalib/src/mesa/main/vtxfmt.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c
index 674edb5e1..6d687de60 100644
--- a/mesalib/src/mesa/main/vtxfmt.c
+++ b/mesalib/src/mesa/main/vtxfmt.c
@@ -36,6 +36,7 @@
#include "eval.h"
#include "dlist.h"
#include "main/dispatch.h"
+#include "vbo/vbo_context.h"
/**
@@ -46,6 +47,8 @@ static void
install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
const GLvertexformat *vfmt)
{
+ assert(ctx->Version > 0);
+
if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
SET_Color4f(tab, vfmt->Color4f);
}
@@ -262,3 +265,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);
+ }
+}
+