Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-09 04:01:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-13 15:20:23 +0300
commit93165cbf478af8f5297a729fa05d387d6070b02d (patch)
tree18d7646e43ddf8001e098037104e230636bdd2e7 /source/blender/editors/mesh
parentde4eb115ac218dc053ef2f61b890a9b935ebf508 (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/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 628178f0d0e..8855840d001 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1147,7 +1147,6 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v
GPUBatch *batch = GPU_batch_create_ex(GPU_PRIM_POINTS, vert, NULL, GPU_BATCH_OWNS_VBO);
GPU_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR);
- GPU_batch_bind(batch);
/* draw any snapped verts first */
rgba_uchar_to_float(fcol, kcd->colors.point_a);
@@ -1156,7 +1155,7 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v
GPU_shader_set_srgb_uniform(batch->interface);
GPU_point_size(11);
if (snapped_verts_count > 0) {
- GPU_batch_draw_advanced(batch, 0, snapped_verts_count, 0, 0);
+ GPU_batch_draw_range(batch, 0, snapped_verts_count);
}
/* now draw the rest */
@@ -1164,7 +1163,7 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v
GPU_batch_uniform_4fv(batch, "color", fcol);
GPU_point_size(7);
if (other_verts_count > 0) {
- GPU_batch_draw_advanced(batch, snapped_verts_count, other_verts_count, 0, 0);
+ GPU_batch_draw_range(batch, snapped_verts_count, other_verts_count);
}
GPU_batch_discard(batch);