diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2001-03-29 21:16:25 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2001-03-29 21:16:25 +0000 |
commit | ed39a43b8cb2e1cf69b097fc89365cde470ebf51 (patch) | |
tree | e886defa720e33ec795c7ffb7941fcab5c5b8e1d /src/mesa/tnl | |
parent | 2780ed4b978b32a08be6eecb0e923250e7b907ee (diff) | |
download | external_mesa3d-ed39a43b8cb2e1cf69b097fc89365cde470ebf51.zip external_mesa3d-ed39a43b8cb2e1cf69b097fc89365cde470ebf51.tar.gz external_mesa3d-ed39a43b8cb2e1cf69b097fc89365cde470ebf51.tar.bz2 |
Remove ENABLE_* flags, ctx->_Enabled.
Replace with ctx->Texture._TexMatEnabled, ctx->Texture._TexGenEnabled.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_vb_texgen.c | 20 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texmat.c | 8 |
2 files changed, 18 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index cbc7778..78ac09d 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_texgen.c,v 1.6 2001/03/12 00:48:44 gareth Exp $ */ +/* $Id: t_vb_texgen.c,v 1.7 2001/03/29 21:16:26 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -78,7 +78,6 @@ struct texgen_stage_data { - static GLuint all_bits[5] = { 0, VEC_SIZE_1, @@ -89,6 +88,12 @@ static GLuint all_bits[5] = { #define VEC_SIZE_FLAGS (VEC_SIZE_1|VEC_SIZE_2|VEC_SIZE_3|VEC_SIZE_4) +#define TEXGEN_NEED_M (TEXGEN_SPHERE_MAP) +#define TEXGEN_NEED_F (TEXGEN_SPHERE_MAP | \ + TEXGEN_REFLECTION_MAP_NV) + + + /* */ static void build_m3(GLfloat f[][3], GLfloat m[], @@ -532,7 +537,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx, GLuint i; for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - if (ctx->_Enabled & ENABLE_TEXGEN(i)) { + if (ctx->Texture._TexGenEnabled & ENABLE_TEXGEN(i)) { if (stage->changed_inputs & (VERT_EYE | VERT_NORM | VERT_TEX(i))) store->TexgenFunc[i]( ctx, store, i ); @@ -595,18 +600,21 @@ static void check_texgen( GLcontext *ctx, struct gl_pipeline_stage *stage ) GLuint i; stage->active = 0; - if (ctx->_Enabled & ENABLE_TEXGEN_ANY) { + if (ctx->Texture._TexGenEnabled) { GLuint inputs = 0; GLuint outputs = 0; - if (ctx->Texture._GenFlags & TEXGEN_NEED_VERTICES) + if (ctx->Texture._GenFlags & TEXGEN_OBJ_LINEAR) + inputs |= VERT_OBJ; + + if (ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD) inputs |= VERT_EYE; if (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS) inputs |= VERT_NORM; for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - if (ctx->_Enabled & ENABLE_TEXGEN(i)) + if (ctx->Texture._TexGenEnabled & ENABLE_TEXGEN(i)) { outputs |= VERT_TEX(i); diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index 6fd08d4..2eb6c94 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_texmat.c,v 1.4 2001/03/12 00:48:44 gareth Exp $ */ +/* $Id: t_vb_texmat.c,v 1.5 2001/03/29 21:16:26 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -60,11 +60,11 @@ static void check_texmat( GLcontext *ctx, struct gl_pipeline_stage *stage ) GLuint i; stage->active = 0; - if (ctx->_Enabled & ENABLE_TEXMAT_ANY) { + if (ctx->Texture._TexMatEnabled) { GLuint flags = 0; for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - if (ctx->_Enabled & ENABLE_TEXMAT(i)) + if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i)) flags |= VERT_TEX(i); stage->active = 1; @@ -84,7 +84,7 @@ static GLboolean run_texmat_stage( GLcontext *ctx, * identity, so we don't have to check that here. */ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - if (ctx->_Enabled & ENABLE_TEXMAT(i)) { + if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i)) { if (stage->changed_inputs & VERT_TEX(i)) (void) TransformRaw( &store->texcoord[i], &ctx->TextureMatrix[i], VB->TexCoordPtr[i]); |