mesa/vbo: replace vbo_draw_method() with _mesa_set_drawing_arrays()
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 <mathias.froehlich@web.de>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user