From 0a7602b938893e1b04a01ca8680376cbeec053ab Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 26 Dec 2011 14:43:07 -0700 Subject: vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays This fixes a regression seen with the isosurf demo when switching between glBegin/End and glDrawArrays (do it several times). The problem was the driver wasn't getting _NEW_ARRAY when the arrays were subtly changed: (vertex3f, normal3f) vs. (normal3f, vertex3f). This patch fixes that by signaling _NEW_ARRAY whenever we transition between glBegin/End and glDrawArrays mode and display lists. The patch also fixes up the initialization of the map_vp_none[] array to stop putting strange values in the last five elements of the array. v2: remove DRAW_ELEMENTS, don't distinguish between glDrawArrays and glDrawElements v3: add DRAW_DISPLAY_LIST for the display list case, just to be safe. Reviewed-by: Mathias Froehlich Tested-by: Mathias Froehlich --- src/mesa/vbo/vbo_exec_api.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/vbo/vbo_exec_api.c') diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 4be016925c9..cb5f9ae522b 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -701,6 +701,8 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode ) return; } + vbo_draw_method(exec, DRAW_BEGIN_END); + if (ctx->Driver.PrepareExecBegin) ctx->Driver.PrepareExecBegin(ctx); -- cgit v1.2.3