diff options
author | Brian Paul <[email protected]> | 2018-01-24 09:14:35 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-29 08:35:14 -0700 |
commit | 0d044f7d619c56c67d8235312363d93e2362248f (patch) | |
tree | 14c151223842438d386f5369075b007f44d4c377 /src/mesa/vbo/vbo_save_draw.c | |
parent | d9894ede02d13735c62da3e0ace9e9c647e2956a (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 60405d54ead..c86efcb05ee 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -34,6 +34,7 @@ #include "main/macros.h" #include "main/light.h" #include "main/state.h" +#include "main/varray.h" #include "util/bitscan.h" #include "vbo_private.h" @@ -267,7 +268,8 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) { const struct vbo_save_vertex_list *node = (const struct vbo_save_vertex_list *) data; - struct vbo_save_context *save = &vbo_context(ctx)->save; + struct vbo_context *vbo = vbo_context(ctx); + struct vbo_save_context *save = &vbo->save; GLboolean remap_vertex_store = GL_FALSE; if (save->vertex_store && save->vertex_store->buffer_map) { @@ -318,7 +320,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) bind_vertex_list(ctx, node); - vbo_draw_method(vbo_context(ctx), DRAW_DISPLAY_LIST); + _mesa_set_drawing_arrays(ctx, vbo->save.inputs); /* Again... */ |