From 790734045b69c47b1525fbf9106a7ca5a8eb7416 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 5 Jan 2004 09:43:42 +0000 Subject: Re-commit t_vertex.[ch] changes to fd.o server. --- src/mesa/tnl/t_context.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/mesa/tnl/t_context.c') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index a78d880d01..8b83372fa7 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -29,11 +29,13 @@ #include "api_arrayelt.h" #include "glheader.h" #include "imports.h" +#include "context.h" #include "macros.h" #include "mtypes.h" #include "dlist.h" #include "light.h" #include "vtxfmt.h" +#include "nvfragprog.h" #include "t_context.h" #include "t_array_api.h" @@ -153,6 +155,30 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) tnl->pipeline.build_state_trigger); tnl->vtx.eval.new_state |= new_state; + + /* Calculate tnl->render_inputs: + */ + if (ctx->Visual.rgbMode) { + tnl->render_inputs = (_TNL_BIT_POS| + _TNL_BIT_COLOR0| + (ctx->Texture._EnabledUnits << _TNL_ATTRIB_TEX0)); + + if (NEED_SECONDARY_COLOR(ctx)) + tnl->render_inputs |= _TNL_BIT_COLOR1; + } + else { + tnl->render_inputs |= (_TNL_BIT_POS|_TNL_BIT_INDEX); + } + + if (ctx->Fog.Enabled) + tnl->render_inputs |= _TNL_BIT_FOG; + + if (ctx->Polygon.FrontMode != GL_FILL || + ctx->Polygon.BackMode != GL_FILL) + tnl->render_inputs |= _TNL_BIT_EDGEFLAG; + + if (ctx->RenderMode == GL_FEEDBACK) + tnl->render_inputs |= _TNL_BIT_TEX0; } -- cgit v1.2.3