summaryrefslogtreecommitdiff
path: root/src/mesa/main/vtxfmt.c
diff options
context:
space:
mode:
authorGareth Hughes <gareth@valinux.com>2001-03-11 23:49:20 +0000
committerGareth Hughes <gareth@valinux.com>2001-03-11 23:49:20 +0000
commitde6a2e0d194d1afa1a917cff7e80d77773b73c39 (patch)
treea8930ec6cd7d048be260866c4977b4d608d0f0e6 /src/mesa/main/vtxfmt.c
parentd8aa0269cdadba1608522287bcb3b446c5848c09 (diff)
Clean up install, restore for exec vtxfmts.
Diffstat (limited to 'src/mesa/main/vtxfmt.c')
-rw-r--r--src/mesa/main/vtxfmt.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 22685e0f37..d5660e8b54 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -1,4 +1,4 @@
-/* $Id: vtxfmt.c,v 1.2 2001/03/11 18:49:11 gareth Exp $ */
+/* $Id: vtxfmt.c,v 1.3 2001/03/11 23:49:20 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -149,28 +149,33 @@ static void install_vtxfmt( struct _glapi_table *tab, GLvertexformat *vfmt )
}
-void _mesa_install_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
+void _mesa_init_exec_vtxfmt( GLcontext *ctx )
{
- ctx->TnlModule.Current = vfmt;
install_vtxfmt( ctx->Exec, &neutral_vtxfmt );
- if (ctx->ExecPrefersFloat != vfmt->prefer_float_colors)
+}
+
+void _mesa_install_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
+{
+ struct gl_tnl_module *tnl = &(ctx->TnlModule);
+
+ tnl->Current = vfmt;
+ _mesa_restore_exec_vtxfmt( ctx );
+ if ( ctx->ExecPrefersFloat != vfmt->prefer_float_colors )
_mesa_loopback_prefer_float( ctx->Exec, vfmt->prefer_float_colors );
}
void _mesa_install_save_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
{
install_vtxfmt( ctx->Save, vfmt );
- if (ctx->SavePrefersFloat != vfmt->prefer_float_colors)
+ if ( ctx->SavePrefersFloat != vfmt->prefer_float_colors )
_mesa_loopback_prefer_float( ctx->Save, vfmt->prefer_float_colors );
}
-void _mesa_restore_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
+void _mesa_restore_exec_vtxfmt( GLcontext *ctx )
{
struct gl_tnl_module *tnl = &(ctx->TnlModule);
GLuint i;
- tnl->Current = vfmt;
-
/* Restore the neutral tnl module wrapper.
*/
for ( i = 0 ; i < tnl->SwapCount ; i++ ) {