summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vp_build.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-05-10 11:41:33 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-05-10 11:41:33 +0000
commitd9fdb6c2bb52b4909265f504287ee8e4bc2d919f (patch)
tree3e3759689354fe0c6c76c0f314682fe62e09d838 /src/mesa/tnl/t_vp_build.c
parent9eef0da109414228bfd2b2c6409bcb948694be0f (diff)
Missing from previous commit
Diffstat (limited to 'src/mesa/tnl/t_vp_build.c')
-rw-r--r--src/mesa/tnl/t_vp_build.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 9034fc7712..22dc595abb 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -1097,10 +1097,14 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
if (ctx->VertexProgram._Enabled)
return;
+
+ if (!ctx->_TnlProgram)
+ ctx->_TnlProgram = (struct vertex_program *)
+ ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
memset(&p, 0, sizeof(p));
p.ctx = ctx;
- p.program = &ctx->_TnlProgram;
+ p.program = ctx->_TnlProgram;
p.eye_position = undef;
p.eye_position_normalized = undef;
@@ -1122,7 +1126,7 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
p.program->Base.NumAttributes = p.program->Base.NumAddressRegs = 0;
if (p.program->Parameters)
_mesa_free_parameter_list(p.program->Parameters);
- p.program->Parameters = _mesa_new_parameter_list ();
+ p.program->Parameters = _mesa_new_parameter_list();
p.program->InputsRead = 0;
p.program->OutputsWritten = 0;