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/uvedit/uvedit_draw.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index df8d3cfb8db..f26e95d8861 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,10 +305,8 @@ 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);
}
-
- GPU_batch_program_use_end(geom);
}
else {
GPU_batch_draw(geom);
@@ -455,6 +449,8 @@ static void draw_uvs(SpaceImage *sima,
}
col1[3] = overlay_alpha;
+ GPU_batch_program_set_builtin(batch->edges, shader);
+
/* Inner Line. Use depth test to insure selection is drawn on top. */
GPU_depth_test(true);
GPU_line_width(1.0f);