diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2003-06-01 15:39:58 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2003-06-01 15:39:58 +0000 |
commit | f1163a37695ad07d9d4a5cdd1a9104932c157535 (patch) | |
tree | f404fe739f84378dd815f73edabeb796a658f3f1 | |
parent | 236d2dbc7289cd9106729e619714a509bc402fd7 (diff) |
setup default programs for GL_ARB_vertex/fragment_program
-rw-r--r-- | src/mesa/main/context.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 798308a875..4272aa45ab 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1542,19 +1542,24 @@ init_attrib_groups( GLcontext *ctx ) /* Vertex/fragment programs */ ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = _mesa_strdup(""); -#if FEATURE_NV_vertex_program +#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program ctx->VertexProgram.Enabled = GL_FALSE; ctx->VertexProgram.PointSizeEnabled = GL_FALSE; ctx->VertexProgram.TwoSideEnabled = GL_FALSE; ctx->VertexProgram.Current = NULL; + ctx->VertexProgram.Current = (struct vertex_program *) ctx->Shared->DefaultVertexProgram; + assert(ctx->VertexProgram.Current); + ctx->VertexProgram.Current->Base.RefCount++; for (i = 0; i < VP_NUM_PROG_REGS / 4; i++) { ctx->VertexProgram.TrackMatrix[i] = GL_NONE; ctx->VertexProgram.TrackMatrixTransform[i] = GL_IDENTITY_NV; } #endif -#if FEATURE_NV_fragment_program +#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program ctx->FragmentProgram.Enabled = GL_FALSE; - ctx->FragmentProgram.Current = NULL; + ctx->FragmentProgram.Current = (struct fragment_program *) ctx->Shared->DefaultFragmentProgram; + assert(ctx->FragmentProgram.Current); + ctx->FragmentProgram.Current->Base.RefCount++; #endif /* Miscellaneous */ |