draw: corrections to allow for different cliptest cases
[mesa.git] / src / mesa / vbo / vbo_save.h
index 9558f83883758571988c8678fb419a19c2422d28..82ba6c8afe786acf725753b5348117bd7c82d8a5 100644 (file)
@@ -64,6 +64,13 @@ struct vbo_save_vertex_list {
    GLubyte attrsz[VBO_ATTRIB_MAX];
    GLuint vertex_size;
 
+   /* Copy of the final vertex from node->vertex_store->bufferobj.
+    * Keep this in regular (non-VBO) memory to avoid repeated
+    * map/unmap of the VBO when updating GL current data.
+    */
+   GLfloat *current_data;
+   GLuint current_size;
+
    GLuint buffer_offset;
    GLuint count;
    GLuint wrap_count;          /* number of copied vertices at start */
@@ -146,6 +153,7 @@ struct vbo_save_context {
    GLubyte *currentsz[VBO_ATTRIB_MAX];
 };
 
+#if FEATURE_dlist
 
 void vbo_save_init( GLcontext *ctx );
 void vbo_save_destroy( GLcontext *ctx );
@@ -174,4 +182,18 @@ void vbo_save_playback_vertex_list( GLcontext *ctx, void *data );
 
 void vbo_save_api_init( struct vbo_save_context *save );
 
-#endif
+#else /* FEATURE_dlist */
+
+static INLINE void
+vbo_save_init( GLcontext *ctx )
+{
+}
+
+static INLINE void
+vbo_save_destroy( GLcontext *ctx )
+{
+}
+
+#endif /* FEATURE_dlist */
+
+#endif /* VBO_SAVE_H */