vbo: add _mesa_initialize_vbo_vtxfmt

This function initializes the exec/save dispatch tables
for VBO vtxfmt.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jordan Justen
2012-11-19 11:17:39 -08:00
parent d440149538
commit 0924f4e90c
2 changed files with 19 additions and 0 deletions

View File

@@ -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);
}
}

View File

@@ -39,5 +39,6 @@
extern void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
extern void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
extern void _mesa_initialize_vbo_vtxfmt(struct gl_context *ctx);
#endif /* _VTXFMT_H_ */