diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-09 04:01:13 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-13 15:20:23 +0300 |
commit | 93165cbf478af8f5297a729fa05d387d6070b02d (patch) | |
tree | 18d7646e43ddf8001e098037104e230636bdd2e7 /source/blender/editors/uvedit/uvedit_draw.c | |
parent | de4eb115ac218dc053ef2f61b890a9b935ebf508 (diff) |
GPUBatch: Remove most use of GPU_batch_draw_advanced()
This is in order to better encapsulate / isolate the drawing code.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_draw.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index ae656d95f2d..a4fe511d816 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -288,10 +288,6 @@ static void draw_uvs_texpaint(const Scene *scene, Object *ob, Depsgraph *depsgra uint idx = 0; bool prev_ma_match = (mpoly->mat_nr == (ob_eval->actcol - 1)); - GPU_matrix_bind(geom->interface); - GPU_shader_set_srgb_uniform(geom->interface); - GPU_batch_bind(geom); - /* TODO(fclem): If drawcall count becomes a problem in the future * we can use multi draw indirect drawcalls for this. * (not implemented in GPU module at the time of writing). */ @@ -299,7 +295,7 @@ static void draw_uvs_texpaint(const Scene *scene, Object *ob, Depsgraph *depsgra bool ma_match = (mpoly->mat_nr == (ob_eval->actcol - 1)); if (ma_match != prev_ma_match) { if (ma_match == false) { - GPU_batch_draw_advanced(geom, draw_start, idx - draw_start, 0, 0); + GPU_batch_draw_range(geom, draw_start, idx - draw_start); } else { draw_start = idx; @@ -309,7 +305,7 @@ static void draw_uvs_texpaint(const Scene *scene, Object *ob, Depsgraph *depsgra prev_ma_match = ma_match; } if (prev_ma_match == true) { - GPU_batch_draw_advanced(geom, draw_start, idx - draw_start, 0, 0); + GPU_batch_draw_range(geom, draw_start, idx - draw_start); } } else { |