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:
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 6f4f75e802a..b02e48a652e 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1147,16 +1147,13 @@ 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);
GPU_batch_uniform_4fv(batch, "color", fcol);
- GPU_matrix_bind(batch->interface);
- 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,10 +1161,9 @@ 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_program_use_end(batch);
GPU_batch_discard(batch);
GPU_blend(false);