From 0d044f7d619c56c67d8235312363d93e2362248f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 24 Jan 2018 09:14:35 -0700 Subject: mesa/vbo: replace vbo_draw_method() with _mesa_set_drawing_arrays() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The arrays specified by ctx->Array._DrawArrays are used for all vertex drawing via vbo_context::draw_prims(). Different arrays are used for immediate mode, vertex arrays, display lists, etc. Changing from one to another requires updating derived/driver array state. Before, we indirectly specifid the arrays with the gl_draw_method values. Now we just directly specify the arrays instead. This is simpler and will allow a subsequent display list optimization. In the future, it might make sense to get rid of ctx->Array._DrawArrays entirely and just pass the arrays as another parameter to vbo_context::draw_prims(). Reviewed-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 881255ceb72..64e792bfa2c 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -770,7 +770,7 @@ vbo_exec_Begin(GLenum mode) return; } - vbo_draw_method(vbo_context(ctx), DRAW_BEGIN_END); + _mesa_set_drawing_arrays(ctx, exec->vtx.inputs); if (ctx->NewState) { _mesa_update_state(ctx); -- cgit v1.2.3