summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_save.h
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-04-16 12:19:19 +0100
committerKeith Whitwell <keithw@vmware.com>2009-04-16 12:19:19 +0100
commit8b2ebd15310cbd5d905b08761b5e950f8e2580e5 (patch)
tree9b0775ff18df77fa3730d45156bef73c90c39d7a /src/mesa/vbo/vbo_save.h
parente80d1e367a25af406c7f2327646c0aa699962fe8 (diff)
vbo: cache last dlist vertex in malloced memory
Avoids repeated mapping of the VBO buffer on display list replay. We need access to the final vertex in order to update the GL current attrib values.
Diffstat (limited to 'src/mesa/vbo/vbo_save.h')
-rw-r--r--src/mesa/vbo/vbo_save.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index 9558f83883..86bbd24f7b 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -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 */