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-16 16:38:34 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commitbf1b622dd962416fef94ccb2f47878eced31e20d (patch)
tree8622462ebdfbc6e347975d1b875b817356e4e84a /source/blender/editors/uvedit
parent10558d6973be8fc461a4b8aad734ba0881d18e85 (diff)
GPUState: GPU_blend final API renaming
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c26
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c4
2 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 03ec8c81294..faeefcb989e 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -237,10 +237,10 @@ static void draw_uvs_shadow(SpaceImage *sima,
if (edges) {
if (sima->flag & SI_SMOOTH_UV) {
GPU_line_smooth(true);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
}
else if (overlay_alpha < 1.0f) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
}
col[3] = overlay_alpha;
@@ -250,10 +250,10 @@ static void draw_uvs_shadow(SpaceImage *sima,
if (sima->flag & SI_SMOOTH_UV) {
GPU_line_smooth(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
else if (overlay_alpha < 1.0f) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
}
@@ -349,7 +349,7 @@ static void draw_uvs(SpaceImage *sima,
interpedges = (ts->uv_selectmode == UV_SELECT_VERTEX);
}
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
if (batch->faces) {
GPU_batch_program_set_builtin(batch->faces,
@@ -359,7 +359,7 @@ static void draw_uvs(SpaceImage *sima,
GPU_SHADER_2D_UV_FACES);
if (!draw_stretch) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
UI_GetThemeColor4fv(TH_FACE, col1);
UI_GetThemeColor4fv(TH_FACE_SELECT, col2);
@@ -386,16 +386,16 @@ static void draw_uvs(SpaceImage *sima,
GPU_batch_draw(batch->faces);
if (!draw_stretch) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
if (batch->edges) {
if (sima->flag & SI_SMOOTH_UV) {
GPU_line_smooth(true);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
}
else if (overlay_alpha < 1.0f) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
}
{
@@ -464,10 +464,10 @@ static void draw_uvs(SpaceImage *sima,
if (sima->flag & SI_SMOOTH_UV) {
GPU_line_smooth(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
else if (overlay_alpha < 1.0f) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
@@ -477,7 +477,7 @@ static void draw_uvs(SpaceImage *sima,
const float point_size = UI_GetThemeValuef(TH_VERTEX_SIZE);
const float pinned_col[4] = {1.0f, 0.0f, 0.0f, 1.0f}; /* TODO Theme? */
UI_GetThemeColor4fv(TH_VERTEX, col1);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
GPU_program_point_size(true);
GPU_batch_program_set_builtin(batch->verts, GPU_SHADER_2D_UV_VERTS);
@@ -497,7 +497,7 @@ static void draw_uvs(SpaceImage *sima,
GPU_batch_uniform_4fv(batch->verts, "selectColor", col2);
GPU_batch_draw(batch->verts);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_program_point_size(false);
}
if (batch->facedots) {
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 6332a6ab48f..6dac31794b4 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1765,7 +1765,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void
pos_id = GPU_vertformat_attr_add(&format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
}
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
/* Static Tris */
if (stitch_preview->static_tris) {
@@ -1829,7 +1829,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void
stitch_draw_vbo(vbo_line, GPU_PRIM_LINES, col);
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
/* draw stitch vert/lines preview */
if (ssc->mode == STITCH_VERT) {