From 6d460af6af77a0d5a5b568bcd6094b98e249ba93 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 23 Apr 2004 14:16:46 +0000 Subject: Added ctx->Vertex/FragmentProgram._Enable flags. Set when vertex/fragment program is enabled AND the currently bound program is valid. Check _Enable instead of Enable to prevent things from blowing up when someone calls glEnable(GL_VERTEX_PROGRAM_ARB) without actually defining a program. --- src/mesa/main/api_validate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/api_validate.c') diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 4e09c2855a..d1c8f42e74 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -1,7 +1,6 @@ - /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. * @@ -62,7 +61,7 @@ _mesa_validate_DrawElements(GLcontext *ctx, /* Always need vertex positions */ if (!ctx->Array.Vertex.Enabled - && !(ctx->VertexProgram.Enabled && ctx->Array.VertexAttrib[0].Enabled)) + && !(ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled)) return GL_FALSE; /* Vertex buffer object tests */ @@ -168,7 +167,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, /* Always need vertex positions */ if (!ctx->Array.Vertex.Enabled - && !(ctx->VertexProgram.Enabled && ctx->Array.VertexAttrib[0].Enabled)) + && !(ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled)) return GL_FALSE; if (ctx->Const.CheckArrayBounds) { -- cgit v1.2.3