vbo: minor optimisation in vbo_exec_DrawRangeElements
[mesa.git] / src / mesa / vbo / vbo_save_loopback.c
index f253c854d2b9d8208c713a4721cfce323b879298..51e598e7e614a9ddc0f60135f70753ad3022cf22 100644 (file)
@@ -29,6 +29,7 @@
 #include "main/glheader.h"
 #include "main/enums.h"
 #include "main/imports.h"
+#include "main/mfeatures.h"
 #include "main/mtypes.h"
 #include "main/dispatch.h"
 #include "glapi/glapi.h"
 #include "vbo_context.h"
 
 
+#if FEATURE_dlist
 
-typedef void (*attr_func)( GLcontext *ctx, GLint target, const GLfloat * );
+
+typedef void (*attr_func)( struct gl_context *ctx, GLint target, const GLfloat * );
 
 
 /* This file makes heavy use of the aliasing of NV vertex attributes
  * with the legacy attributes, and also with ARB and Material
  * attributes as currently implemented.
  */
-static void VertexAttrib1fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib1fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
 {
    CALL_VertexAttrib1fvNV(ctx->Exec, (target, v));
 }
 
-static void VertexAttrib2fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib2fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
 {
    CALL_VertexAttrib2fvNV(ctx->Exec, (target, v));
 }
 
-static void VertexAttrib3fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib3fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
 {
    CALL_VertexAttrib3fvNV(ctx->Exec, (target, v));
 }
 
-static void VertexAttrib4fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib4fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
 {
    CALL_VertexAttrib4fvNV(ctx->Exec, (target, v));
 }
@@ -78,10 +81,10 @@ struct loopback_attr {
 };
 
 /* Don't emit ends and begins on wrapped primitives.  Don't replay
- * wrapped vertices.  If we get here, it's probably because the the
+ * wrapped vertices.  If we get here, it's probably because the
  * precalculated wrapping is wrong.
  */
-static void loopback_prim( GLcontext *ctx,
+static void loopback_prim( struct gl_context *ctx,
                           const GLfloat *buffer,
                           const struct _mesa_prim *prim,
                           GLuint wrap_count,
@@ -136,7 +139,7 @@ static void loopback_prim( GLcontext *ctx,
  * normally, otherwise need to track and discard the generated
  * primitives.
  */
-static void loopback_weak_prim( GLcontext *ctx,
+static void loopback_weak_prim( struct gl_context *ctx,
                                const struct _mesa_prim *prim )
 {
    /* Use the prim_weak flag to ensure that if this primitive
@@ -153,7 +156,7 @@ static void loopback_weak_prim( GLcontext *ctx,
 }
 
 
-void vbo_loopback_vertex_list( GLcontext *ctx,
+void vbo_loopback_vertex_list( struct gl_context *ctx,
                               const GLfloat *buffer,
                               const GLubyte *attrsz,
                               const struct _mesa_prim *prim,
@@ -188,3 +191,6 @@ void vbo_loopback_vertex_list( GLcontext *ctx,
       }
    }
 }
+
+
+#endif /* FEATURE_dlist */