removed ctx->Polygon._OffsetAny - not really needed

This commit is contained in:
Brian Paul
2002-10-02 21:44:08 +00:00
parent 8420ad94f2
commit 641b2307ec
3 changed files with 12 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: mtypes.h,v 1.89 2002/09/27 02:45:37 brianp Exp $ */ /* $Id: mtypes.h,v 1.90 2002/10/02 21:44:08 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -692,7 +692,7 @@ struct gl_polygon_attrib {
GLenum FrontFace; /* Either GL_CW or GL_CCW */ GLenum FrontFace; /* Either GL_CW or GL_CCW */
GLenum FrontMode; /* Either GL_POINT, GL_LINE or GL_FILL */ GLenum FrontMode; /* Either GL_POINT, GL_LINE or GL_FILL */
GLenum BackMode; /* Either GL_POINT, GL_LINE or GL_FILL */ GLenum BackMode; /* Either GL_POINT, GL_LINE or GL_FILL */
GLboolean _FrontBit; /* */ GLboolean _FrontBit; /* 0=GL_CCW, 1=GL_CW */
GLboolean CullFlag; /* Culling on/off flag */ GLboolean CullFlag; /* Culling on/off flag */
GLboolean SmoothFlag; /* True if GL_POLYGON_SMOOTH is enabled */ GLboolean SmoothFlag; /* True if GL_POLYGON_SMOOTH is enabled */
GLboolean StippleFlag; /* True if GL_POLYGON_STIPPLE is enabled */ GLboolean StippleFlag; /* True if GL_POLYGON_STIPPLE is enabled */
@@ -703,7 +703,6 @@ struct gl_polygon_attrib {
GLboolean OffsetPoint; /* Offset in GL_POINT mode */ GLboolean OffsetPoint; /* Offset in GL_POINT mode */
GLboolean OffsetLine; /* Offset in GL_LINE mode */ GLboolean OffsetLine; /* Offset in GL_LINE mode */
GLboolean OffsetFill; /* Offset in GL_FILL mode */ GLboolean OffsetFill; /* Offset in GL_FILL mode */
GLboolean _OffsetAny;
}; };

View File

@@ -1,4 +1,4 @@
/* $Id: state.c,v 1.92 2002/09/27 02:45:38 brianp Exp $ */ /* $Id: state.c,v 1.93 2002/10/02 21:44:08 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -80,7 +80,7 @@ static int
generic_noop(void) generic_noop(void)
{ {
#ifdef DEBUG #ifdef DEBUG
_mesa_problem(NULL, "undefined function dispatch"); _mesa_problem(NULL, "User called no-op dispatch function");
#endif #endif
return 0; return 0;
} }
@@ -542,23 +542,21 @@ update_polygon( GLcontext *ctx )
ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK;
/* Any Polygon offsets enabled? */ /* Any Polygon offsets enabled? */
ctx->Polygon._OffsetAny = GL_FALSE;
if (ctx->Polygon.OffsetPoint || if (ctx->Polygon.OffsetPoint ||
ctx->Polygon.OffsetLine || ctx->Polygon.OffsetLine ||
ctx->Polygon.OffsetFill) { ctx->Polygon.OffsetFill) {
ctx->_TriangleCaps |= DD_TRI_OFFSET; ctx->_TriangleCaps |= DD_TRI_OFFSET;
ctx->Polygon._OffsetAny = GL_TRUE;
} }
} }
static void static void
calculate_model_project_matrix( GLcontext *ctx ) calculate_model_project_matrix( GLcontext *ctx )
{ {
_math_matrix_mul_matrix( &ctx->_ModelProjectMatrix, _math_matrix_mul_matrix( &ctx->_ModelProjectMatrix,
ctx->ProjectionMatrixStack.Top, ctx->ProjectionMatrixStack.Top,
ctx->ModelviewMatrixStack.Top ); ctx->ModelviewMatrixStack.Top );
_math_matrix_analyse( &ctx->_ModelProjectMatrix ); _math_matrix_analyse( &ctx->_ModelProjectMatrix );
} }
static void static void

View File

@@ -1,4 +1,4 @@
/* $Id: ss_triangle.c,v 1.15 2001/07/17 19:39:32 keithw Exp $ */ /* $Id: ss_triangle.c,v 1.16 2002/10/02 21:44:08 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -265,7 +265,9 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
TNLcontext *tnl = TNL_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint ind = 0; GLuint ind = 0;
if (ctx->Polygon._OffsetAny) if (ctx->Polygon.OffsetPoint ||
ctx->Polygon.OffsetLine ||
ctx->Polygon.OffsetFill)
ind |= SS_OFFSET_BIT; ind |= SS_OFFSET_BIT;
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)