[Mesa-dev] [PATCH 1/6] vbo: update comments for vbo_save_NotifyBegin()

Brian Paul brianp at vmware.com
Thu May 2 15:28:07 PDT 2013


---
 src/mesa/vbo/vbo_save_api.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 9ce3c6e..aa57ee7 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -928,8 +928,10 @@ _save_CallLists(GLsizei n, GLenum type, const GLvoid * v)
 
 
 
-/* This begin is hooked into ...  Updating of
- * ctx->Driver.CurrentSavePrimitive is already taken care of.
+/**
+ * Called via ctx->Driver.NotifySaveBegin() when a glBegin is getting
+ * compiled into a display list.
+ * Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
  */
 GLboolean
 vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
@@ -957,7 +959,13 @@ vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
    else {
       _mesa_install_save_vtxfmt(ctx, &save->vtxfmt);
    }
+
+   /* We need to call SaveFlushVertices() if there's state change */
    ctx->Driver.SaveNeedFlush = 1;
+
+   /* GL_TRUE means we've handled this glBegin here; don't compile a BEGIN
+    * opcode into the display list.
+    */
    return GL_TRUE;
 }
 
-- 
1.7.3.4



More information about the mesa-dev mailing list