finally get rid of ctx->Texture._ReallyEnabled field

This commit is contained in:
Brian Paul
2002-10-08 23:59:33 +00:00
parent 614301faca
commit 59c5cf35c9
5 changed files with 9 additions and 24 deletions

View File

@@ -411,7 +411,7 @@ static swrast_tri_func dmesa_choose_tri_function (GLcontext *ctx)
if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL;
if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL; if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL;
if (ctx->Texture._ReallyEnabled) return (swrast_tri_func) NULL; if (ctx->Texture._EnabledUnits) return (swrast_tri_func) NULL;
if (ctx->Light.ShadeModel==GL_SMOOTH if (ctx->Light.ShadeModel==GL_SMOOTH
&& swrast->_RasterMask==DEPTH_BIT && swrast->_RasterMask==DEPTH_BIT

View File

@@ -1,4 +1,4 @@
/* $Id: context.c,v 1.179 2002/10/04 17:37:45 brianp Exp $ */ /* $Id: context.c,v 1.180 2002/10/08 23:59:33 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -1306,7 +1306,6 @@ init_attrib_groups( GLcontext *ctx )
/* Texture group */ /* Texture group */
ctx->Texture.CurrentUnit = 0; /* multitexture */ ctx->Texture.CurrentUnit = 0; /* multitexture */
ctx->Texture._ReallyEnabled = 0; /* XXX obsolete */
ctx->Texture._EnabledUnits = 0; ctx->Texture._EnabledUnits = 0;
for (i=0; i<MAX_TEXTURE_UNITS; i++) for (i=0; i<MAX_TEXTURE_UNITS; i++)
init_texture_unit( ctx, i ); init_texture_unit( ctx, i );

View File

@@ -1,4 +1,4 @@
/* $Id: mtypes.h,v 1.93 2002/10/04 19:10:08 brianp Exp $ */ /* $Id: mtypes.h,v 1.94 2002/10/08 23:59:33 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -964,12 +964,6 @@ struct gl_texture_attrib {
GLuint CurrentUnit; /* Active texture unit */ GLuint CurrentUnit; /* Active texture unit */
GLuint _EnabledUnits; /* one bit set for each really-enabled unit */ GLuint _EnabledUnits; /* one bit set for each really-enabled unit */
/* XXX this field will go away, use _EnabledUnits instead! */
GLuint _ReallyEnabled; /* enables for all texture units: */
/* = (Unit[0]._ReallyEnabled << 0) | */
/* (Unit[1]._ReallyEnabled << 4) | */
/* (Unit[2]._ReallyEnabled << 8) | etc... */
GLuint _GenFlags; /* for texgen */ GLuint _GenFlags; /* for texgen */
GLuint _TexGenEnabled; GLuint _TexGenEnabled;
GLuint _TexMatEnabled; GLuint _TexMatEnabled;

View File

@@ -1,4 +1,4 @@
/* $Id: state.c,v 1.93 2002/10/02 21:44:08 brianp Exp $ */ /* $Id: state.c,v 1.94 2002/10/08 23:59:33 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -772,7 +772,6 @@ update_texture_state( GLcontext *ctx )
{ {
GLuint unit; GLuint unit;
ctx->Texture._ReallyEnabled = 0; /* XXX obsolete */
ctx->Texture._EnabledUnits = 0; ctx->Texture._EnabledUnits = 0;
ctx->Texture._GenFlags = 0; ctx->Texture._GenFlags = 0;
ctx->_NeedNormals &= ~NEED_NORMALS_TEXGEN; ctx->_NeedNormals &= ~NEED_NORMALS_TEXGEN;
@@ -854,15 +853,8 @@ update_texture_state( GLcontext *ctx )
continue; continue;
} }
/* Texture._ReallyEnabled records the enable state for all units in
* one word.
*/
{
GLuint flag = texUnit->_ReallyEnabled << (unit * NUM_TEXTURE_TARGETS);
ctx->Texture._ReallyEnabled |= flag; /* XXX obsolete field! */
if (texUnit->_ReallyEnabled) if (texUnit->_ReallyEnabled)
ctx->Texture._EnabledUnits |= (1 << unit); ctx->Texture._EnabledUnits |= (1 << unit);
}
if (texUnit->TexGenEnabled) { if (texUnit->TexGenEnabled) {
if (texUnit->TexGenEnabled & S_BIT) { if (texUnit->TexGenEnabled & S_BIT) {

View File

@@ -1,4 +1,4 @@
/* $Id: s_drawpix.c,v 1.36 2002/08/07 00:45:07 brianp Exp $ */ /* $Id: s_drawpix.c,v 1.37 2002/10/08 23:59:34 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -629,7 +629,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
if (ctx->Fog.Enabled) if (ctx->Fog.Enabled)
_mesa_span_default_fog(ctx, &span); _mesa_span_default_fog(ctx, &span);
if (ctx->Texture._ReallyEnabled) if (ctx->Texture._EnabledUnits)
_mesa_span_default_texcoords(ctx, &span); _mesa_span_default_texcoords(ctx, &span);
if (type==GL_UNSIGNED_SHORT && ctx->Visual.depthBits == 16 if (type==GL_UNSIGNED_SHORT && ctx->Visual.depthBits == 16
@@ -737,7 +737,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
_mesa_span_default_z(ctx, &span); _mesa_span_default_z(ctx, &span);
if (ctx->Fog.Enabled) if (ctx->Fog.Enabled)
_mesa_span_default_fog(ctx, &span); _mesa_span_default_fog(ctx, &span);
if (ctx->Texture._ReallyEnabled) if (ctx->Texture._EnabledUnits)
_mesa_span_default_texcoords(ctx, &span); _mesa_span_default_texcoords(ctx, &span);
if (SWRAST_CONTEXT(ctx)->_RasterMask == 0 && !zoom && x >= 0 && y >= 0 if (SWRAST_CONTEXT(ctx)->_RasterMask == 0 && !zoom && x >= 0 && y >= 0