From 1036ec94e5a30f9068a1b41f2e8668daa2ee4a2c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 18 May 2008 15:32:58 -0600 Subject: Fix some bugs in material, depth range state picked from master --- src/mesa/shader/prog_statevars.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index eee4d2d925..ba3c988445 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.0 + * Version: 7.1 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -181,7 +181,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][i]; } /* [3] = material alpha */ - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][3]; return; case STATE_DIFFUSE: for (i = 0; i < 3; i++) { @@ -197,7 +197,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][i]; } /* [3] = material alpha */ - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][3]; return; default: _mesa_problem(ctx, "Invalid lightprod state in fetch_state"); @@ -354,7 +354,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], value[0] = ctx->Viewport.Near; /* near */ value[1] = ctx->Viewport.Far; /* far */ value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */ - value[3] = 0; + value[3] = 1.0; return; case STATE_FRAGMENT_PROGRAM: { -- cgit v1.2.3