diff options
author | Brian Paul <[email protected]> | 2011-02-21 15:11:44 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-02-21 15:15:52 -0700 |
commit | f0c8e7c32766cb78756de24a9ca5e8c28017a682 (patch) | |
tree | 188c9a7a655a0e0bc77ee04113c5d810e30a6edc /src | |
parent | 0ba2810e47d68ec24a93c5fc74cf99afe50e8c9b (diff) |
vbo: comments
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 38c86516ad8..dda008b9552 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -253,6 +253,9 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) } +/** + * Unmap the VBO. This is called before drawing. + */ static void vbo_exec_vtx_unmap( struct vbo_exec_context *exec ) { @@ -285,6 +288,9 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec ) } +/** + * Map the vertex buffer to begin storing glVertex, glColor, etc data. + */ void vbo_exec_vtx_map( struct vbo_exec_context *exec ) { @@ -306,6 +312,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) if (VBO_VERT_BUFFER_SIZE > exec->vtx.buffer_used + 1024 && ctx->Driver.MapBufferRange) { + /* The VBO exists and there's room for more */ exec->vtx.buffer_map = (GLfloat *)ctx->Driver.MapBufferRange(ctx, target, @@ -318,6 +325,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) } if (!exec->vtx.buffer_map) { + /* Need to allocate a new VBO */ exec->vtx.buffer_used = 0; ctx->Driver.BufferData(ctx, target, |