Header file clean-up:
[mesa.git] / src / mesa / tnl / t_vb_render.c
index cc8deff464b3578c51954e79d04cbc29ede21611..976d3fc3d75dd0f956bc8c72a31a4e0e0811de24 100644 (file)
@@ -1,8 +1,8 @@
-/* $Id: t_vb_render.c,v 1.25 2001/12/14 02:51:45 brianp Exp $ */
+/* $Id: t_vb_render.c,v 1.32 2002/10/24 23:57:25 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  3.5
+ * Version:  4.0.1
  *
  * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
  *
@@ -42,8 +42,9 @@
 
 #include "glheader.h"
 #include "context.h"
+#include "enums.h"
 #include "macros.h"
-#include "mem.h"
+#include "imports.h"
 #include "mtypes.h"
 #include "mmath.h"
 
@@ -324,6 +325,12 @@ static GLboolean run_render( GLcontext *ctx,
         length= VB->PrimitiveLength[i];
         ASSERT(length || (flags & PRIM_LAST));
         ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
+
+        if (MESA_VERBOSE & VERBOSE_PRIMS)
+           _mesa_debug(NULL, "MESA prim %s %d..%d\n", 
+                   _mesa_lookup_enum_by_nr(flags & PRIM_MODE_MASK), 
+                   i, i+length);
+
         if (length)
            tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
       }
@@ -349,39 +356,39 @@ static GLboolean run_render( GLcontext *ctx,
  */
 static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
 {
-   GLuint inputs = VERT_CLIP;
+   GLuint inputs = VERT_BIT_CLIP;
    GLuint i;
 
    if (ctx->Visual.rgbMode) {
-      inputs |= VERT_COLOR0_BIT;
+      inputs |= VERT_BIT_COLOR0;
 
       if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
-        inputs |= VERT_COLOR1_BIT;
+        inputs |= VERT_BIT_COLOR1;
 
-      if (ctx->Texture._ReallyEnabled) {
+      if (ctx->Texture._EnabledUnits) {
         for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
            if (ctx->Texture.Unit[i]._ReallyEnabled)
-              inputs |= VERT_TEX(i);
+              inputs |= VERT_BIT_TEX(i);
         }
       }
    }
    else {
-      inputs |= VERT_INDEX_BIT;
+      inputs |= VERT_BIT_INDEX;
    }
 
    if (ctx->Point._Attenuated)
-      inputs |= VERT_POINT_SIZE;
+      inputs |= VERT_BIT_POINT_SIZE;
 
    /* How do drivers turn this off?
     */
    if (ctx->Fog.Enabled)
-      inputs |= VERT_FOG_BIT;
+      inputs |= VERT_BIT_FOG;
 
    if (ctx->_TriangleCaps & DD_TRI_UNFILLED)
-      inputs |= VERT_EDGEFLAG_BIT;
+      inputs |= VERT_BIT_EDGEFLAG;
 
    if (ctx->RenderMode==GL_FEEDBACK)
-      inputs |= VERT_TEX_ANY;
+      inputs |= VERT_BITS_TEX_ANY;
 
    stage->inputs = inputs;
 }