From: Brian Paul Date: Mon, 21 Feb 2011 22:11:44 +0000 (-0700) Subject: vbo: rename, document function params X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cba2df4a6f3b4435fe4be277db4a87b2a0f89e3;p=mesa.git vbo: rename, document function params --- diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index dda008b9552..539658021e3 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -354,9 +354,10 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) /** * Execute the buffer and save copied verts. + * \param keep_unmapped if true, leave the VBO unmapped when we're done. */ void -vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) +vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped) { if (0) vbo_exec_debug_verts( exec ); @@ -396,7 +397,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) /* If using a real VBO, get new storage -- unless asked not to. */ - if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !unmap) { + if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !keepUnmapped) { vbo_exec_vtx_map( exec ); } } @@ -404,14 +405,13 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) /* May have to unmap explicitly if we didn't draw: */ - if (unmap && + if (keepUnmapped && _mesa_is_bufferobj(exec->vtx.bufferobj) && exec->vtx.buffer_map) { vbo_exec_vtx_unmap( exec ); } - - if (unmap || exec->vtx.vertex_size == 0) + if (keepUnmapped || exec->vtx.vertex_size == 0) exec->vtx.max_vert = 0; else exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /