From 83c74b72792928b5a5ac540eeef65fca3145ddb6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 16 Oct 2004 00:29:03 +0000 Subject: fix if/else bug in _mesa_ProgramEnvParameter4fARB (fdo bug 1645) --- src/mesa/shader/arbprogram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/shader') diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 79615d609c..ad8683f00b 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -265,7 +265,7 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index, } ASSIGN_4V(ctx->FragmentProgram.Parameters[index], x, y, z, w); } - if (target == GL_VERTEX_PROGRAM_ARB + else if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { if (index >= ctx->Const.MaxVertexProgramEnvParams) { _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)"); @@ -325,7 +325,7 @@ _mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index, } COPY_4V(params, ctx->FragmentProgram.Parameters[index]); } - if (target == GL_VERTEX_PROGRAM_ARB + else if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { if (index >= ctx->Const.MaxVertexProgramEnvParams) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramEnvParameter(index)"); -- cgit v1.2.3