Drop GLcontext typedef and use struct gl_context instead
[mesa.git] / src / mesa / vbo / vbo_exec.h
index e0f44892cff7a8c5861393365a310729c0bd7621..47e51f09c944f78cd9729bb2681d2dd7dab5ec7e 100644 (file)
@@ -79,7 +79,7 @@ typedef void (*vbo_attrfv_func)( const GLfloat * );
 
 struct vbo_exec_context
 {
-   GLcontext *ctx;   
+   struct gl_context *ctx;   
    GLvertexformat vtxfmt;
 
    struct {
@@ -103,7 +103,7 @@ struct vbo_exec_context
       GLubyte active_sz[VBO_ATTRIB_MAX];
 
       GLfloat *attrptr[VBO_ATTRIB_MAX]; 
-      struct gl_client_array arrays[VBO_ATTRIB_MAX];
+      struct gl_client_array arrays[VERT_ATTRIB_MAX];
 
       /* According to program mode, the values above plus current
        * values are squashed down to the 32 attributes passed to the
@@ -138,19 +138,23 @@ struct vbo_exec_context
        */
       const struct gl_client_array *inputs[VERT_ATTRIB_MAX];
    } array;
+
+#ifdef DEBUG
+   GLint flush_call_depth;
+#endif
 };
 
 
 
 /* External API:
  */
-void vbo_exec_init( GLcontext *ctx );
-void vbo_exec_destroy( GLcontext *ctx );
-void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state );
-void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap );
+void vbo_exec_init( struct gl_context *ctx );
+void vbo_exec_destroy( struct gl_context *ctx );
+void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state );
+void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap );
 
-void vbo_exec_BeginVertices( GLcontext *ctx );
-void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags );
+void vbo_exec_BeginVertices( struct gl_context *ctx );
+void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
 
 
 /* Internal functions:
@@ -161,8 +165,26 @@ void vbo_exec_array_destroy( struct vbo_exec_context *exec );
 
 void vbo_exec_vtx_init( struct vbo_exec_context *exec );
 void vbo_exec_vtx_destroy( struct vbo_exec_context *exec );
+
+#if FEATURE_beginend
+
 void vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap );
 void vbo_exec_vtx_map( struct vbo_exec_context *exec );
+
+#else /* FEATURE_beginend */
+
+static INLINE void
+vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
+{
+}
+
+static INLINE void
+vbo_exec_vtx_map( struct vbo_exec_context *exec )
+{
+}
+
+#endif /* FEATURE_beginend */
+
 void vbo_exec_vtx_wrap( struct vbo_exec_context *exec );
 
 void vbo_exec_eval_update( struct vbo_exec_context *exec );
@@ -173,7 +195,4 @@ void vbo_exec_do_EvalCoord2f( struct vbo_exec_context *exec,
 void vbo_exec_do_EvalCoord1f( struct vbo_exec_context *exec,
                                     GLfloat u);
 
-extern GLboolean 
-vbo_validate_shaders(GLcontext *ctx);
-
 #endif