From 58e991705392a2e17a1c8b034f4083a0adaf1943 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 5 Jan 2001 02:26:48 +0000 Subject: Remove 'pv' parameter from Line/Tri/Point funcs. The provoking vertex is always the last vertex parameter. Modify clipping to preserve pv colors. Modify swrast and X11 driver to expect the pv in the last vertex (was looking in the first vertex previously). Remove all handling of flatshading from swrast_setup. Allow drivers to override the unclipped render tabs in tnl_render_stage directly. (Like in 3.4). Removed fxsimplerender stage. Modified t_vb_rendertmp.h to remove the need for 'parity' arguments in RENDER_TRI macros. --- src/mesa/main/fog.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/mesa/main/fog.c') diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index 2a225d4d87..c0e4b4a907 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -1,4 +1,4 @@ -/* $Id: fog.c,v 1.31 2000/12/26 05:09:28 keithw Exp $ */ +/* $Id: fog.c,v 1.32 2001/01/05 02:26:48 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -89,8 +89,6 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) switch (pname) { case GL_FOG_MODE: m = (GLenum) (GLint) *params; - if (ctx->Fog.Mode == m) - return; switch (m) { case GL_LINEAR: case GL_EXP: @@ -100,6 +98,8 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) gl_error( ctx, GL_INVALID_ENUM, "glFog" ); return; } + if (ctx->Fog.Mode == m) + return; FLUSH_VERTICES(ctx, _NEW_FOG); ctx->Fog.Mode = m; break; @@ -132,7 +132,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) ctx->Fog.Index = *params; break; case GL_FOG_COLOR: - if (TEST_EQ_4V(ctx->Fog.Color, params)) + if (TEST_EQ_4V(ctx->Fog.Color, params)) return; FLUSH_VERTICES(ctx, _NEW_FOG); ctx->Fog.Color[0] = params[0]; @@ -142,12 +142,12 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) break; case GL_FOG_COORDINATE_SOURCE_EXT: { GLenum p = (GLenum)(GLint) *params; - if (ctx->Fog.FogCoordinateSource == p) - return; if (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT) { gl_error( ctx, GL_INVALID_ENUM, "glFog" ); return; } + if (ctx->Fog.FogCoordinateSource == p) + return; FLUSH_VERTICES(ctx, _NEW_FOG); ctx->Fog.FogCoordinateSource = p; break; @@ -160,8 +160,6 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) if (ctx->Driver.Fogfv) { (*ctx->Driver.Fogfv)( ctx, pname, params ); } - - ctx->NewState |= _NEW_FOG; } -- cgit v1.2.3