summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-05-01 19:15:32 -0600
committerBrian Paul <brianp@vmware.com>2013-05-02 09:03:15 -0600
commita07437dc28283d471988e69586c849547894cc3c (patch)
treee13d37d320cfc8a94a5a39ac49265b84fbd5d5e1
parente880b7cbf894d10a773f5dcd04535d40f9f5f035 (diff)
mesa: comments, formatting fixes in dlist code
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
-rw-r--r--src/mesa/main/dlist.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 882163e51ad..73d35fe891d 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1354,7 +1354,14 @@ save_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
"glDrawElementsInstancedBaseVertexBaseInstance() during display list compile");
}
-static void invalidate_saved_current_state( struct gl_context *ctx )
+
+/**
+ * While building a display list we cache some OpenGL state.
+ * Under some circumstances we need to invalidate that state (immediately
+ * when we start compiling a list, or after glCallList(s)).
+ */
+static void
+invalidate_saved_current_state(struct gl_context *ctx)
{
GLint i;
@@ -1369,6 +1376,7 @@ static void invalidate_saved_current_state( struct gl_context *ctx )
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
}
+
static void GLAPIENTRY
save_CallList(GLuint list)
{
@@ -8623,8 +8631,7 @@ _mesa_NewList(GLuint name, GLenum mode)
ctx->CompileFlag = GL_TRUE;
ctx->ExecuteFlag = (mode == GL_COMPILE_AND_EXECUTE);
- /* Reset acumulated list state:
- */
+ /* Reset accumulated list state */
invalidate_saved_current_state( ctx );
/* Allocate new display list */