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/gizmo_library')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_draw_utils.c4
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c8
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c12
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c8
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c8
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c4
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c12
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c8
8 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_draw_utils.c b/source/blender/editors/gizmo_library/gizmo_draw_utils.c
index 033673a99a8..2896aa25930 100644
--- a/source/blender/editors/gizmo_library/gizmo_draw_utils.c
+++ b/source/blender/editors/gizmo_library/gizmo_draw_utils.c
@@ -84,13 +84,13 @@ void wm_gizmo_geometryinfo_draw(const GizmoGeomInfo *info,
* since it causes issues leaving the GL state modified. */
#if 0
GPU_face_culling(GPU_CULL_BACK);
- GPU_depth_test(true);
+ GPU_depth_test(GPU_DEPTH_LESS_EQUAL);
#endif
GPU_batch_draw(batch);
#if 0
- GPU_depth_test(false);
+ GPU_depth_test(GPU_DEPTH_NONE);
GPU_face_culling(GPU_CULL_NONE);
#endif
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
index 341f43d0662..d4d9f9bf424 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
@@ -195,9 +195,9 @@ static void arrow_draw_intern(ArrowGizmo3D *arrow, const bool select, const bool
GPU_matrix_push();
GPU_matrix_mul(matrix_final);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
arrow_draw_geom(arrow, select, color);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_matrix_pop();
@@ -207,9 +207,9 @@ static void arrow_draw_intern(ArrowGizmo3D *arrow, const bool select, const bool
GPU_matrix_push();
GPU_matrix_mul(inter->init_matrix_final);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
arrow_draw_geom(arrow, select, (const float[4]){0.5f, 0.5f, 0.5f, 0.5f});
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_matrix_pop();
}
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
index c5231b3cd96..13f3903f0b2 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
@@ -195,7 +195,7 @@ static void button2d_draw_intern(const bContext *C,
}
else {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
if (draw_options & ED_GIZMO_BUTTON_SHOW_BACKDROP) {
const float fill_alpha = RNA_float_get(gz->ptr, "backdrop_fill_alpha");
@@ -226,10 +226,10 @@ static void button2d_draw_intern(const bContext *C,
float color_contrast[4];
copy_v3_fl(color_contrast, rgb_to_grayscale(color) < 0.2f ? 1 : 0);
color_contrast[3] = color[3];
- GPU_batch_uniform_4f(button->shape_batch[i], "color", UNPACK4(color_contrast));
+ GPU_shader_uniform_4f(button->shape_batch[i]->shader, "color", UNPACK4(color_contrast));
}
else {
- GPU_batch_uniform_4f(button->shape_batch[i], "color", UNPACK4(color));
+ GPU_shader_uniform_4f(button->shape_batch[i]->shader, "color", UNPACK4(color));
}
GPU_batch_draw(button->shape_batch[i]);
@@ -265,7 +265,7 @@ static void button2d_draw_intern(const bContext *C,
UI_icon_draw_alpha(pos[0], pos[1], button->icon, alpha);
GPU_polygon_smooth(true);
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
if (need_to_pop) {
@@ -283,9 +283,9 @@ static void gizmo_button2d_draw(const bContext *C, wmGizmo *gz)
{
const bool is_highlight = (gz->state & WM_GIZMO_STATE_HIGHLIGHT) != 0;
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
button2d_draw_intern(C, gz, false, is_highlight);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static int gizmo_button2d_test_select(bContext *C, wmGizmo *gz, const int mval[2])
diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
index 406d66dfd8f..be5f488d759 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
@@ -626,14 +626,14 @@ static void gizmo_cage2d_draw_intern(wmGizmo *gz,
/* Handy for quick testing draw (if it's outside bounds). */
if (false) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4fv((const float[4]){1, 1, 1, 0.5f});
float s = 0.5f;
immRectf(pos, -s, -s, s, s);
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
if (select) {
@@ -722,7 +722,7 @@ static void gizmo_cage2d_draw_intern(wmGizmo *gz,
float color[4], black[3] = {0, 0, 0};
gizmo_color_get(gz, highlight, color);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
float outline_line_width = gz->line_width + 3.0f;
cage2d_draw_circle_wire(&r, margin, black, transform_flag, draw_options, outline_line_width);
@@ -732,7 +732,7 @@ static void gizmo_cage2d_draw_intern(wmGizmo *gz,
cage2d_draw_circle_handles(&r, margin, color, transform_flag, true);
cage2d_draw_circle_handles(&r, margin, (const float[3]){0, 0, 0}, transform_flag, false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
else {
BLI_assert(0);
diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
index 0bc65fe10a5..644a4247d84 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
@@ -303,14 +303,14 @@ static void gizmo_cage3d_draw_intern(
/* Handy for quick testing draw (if it's outside bounds). */
if (false) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
immUniformColor4fv((const float[4]){1, 1, 1, 0.5f});
float s = 0.5f;
immRectf(pos, -s, -s, s, s);
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
if (select) {
@@ -382,7 +382,7 @@ static void gizmo_cage3d_draw_intern(
float color[4], black[3] = {0, 0, 0};
gizmo_color_get(gz, highlight, color);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
cage3d_draw_circle_wire(
size_real, margin, black, transform_flag, draw_options, gz->line_width + 3.0f);
@@ -395,7 +395,7 @@ static void gizmo_cage3d_draw_intern(
cage3d_draw_circle_handles(rv3d, matrix_final, size_real, margin, color, true, 40);
GPU_polygon_smooth(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
else {
BLI_assert(0);
diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
index 5d7c3a9e717..e1860d5d0fd 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
@@ -482,9 +482,9 @@ static void gizmo_dial_draw(const bContext *C, wmGizmo *gz)
clip_plane[3] += DIAL_CLIP_BIAS;
}
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
dial_draw_intern(C, gz, false, is_highlight, clip_plane);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static int gizmo_dial_modal(bContext *C,
diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
index db57a33f543..ad7036f4460 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
@@ -207,9 +207,9 @@ static void move3d_draw_intern(const bContext *C,
GPU_matrix_mul(matrix_align);
}
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
move_geom_draw(gz, color, select, draw_options);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_matrix_pop();
if (gz->interaction_data) {
@@ -220,9 +220,9 @@ static void move3d_draw_intern(const bContext *C,
GPU_matrix_mul(matrix_align);
}
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
move_geom_draw(gz, (const float[4]){0.5f, 0.5f, 0.5f, 0.5f}, select, draw_options);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_matrix_pop();
}
}
@@ -240,9 +240,9 @@ static void gizmo_move_draw(const bContext *C, wmGizmo *gz)
(void)is_modal;
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
move3d_draw_intern(C, gz, false, is_highlight);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static int gizmo_move_modal(bContext *C,
diff --git a/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c
index 48b2e3348c9..177687b6afd 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c
@@ -96,9 +96,9 @@ static void gizmo_primitive_draw_intern(wmGizmo *gz,
GPU_matrix_push();
GPU_matrix_mul(matrix_final);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
gizmo_primitive_draw_geom(color_inner, color_outer, draw_style);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_matrix_pop();
@@ -112,9 +112,9 @@ static void gizmo_primitive_draw_intern(wmGizmo *gz,
GPU_matrix_push();
GPU_matrix_mul(inter->init_matrix_final);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
gizmo_primitive_draw_geom(color_inner, color_outer, draw_style);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_matrix_pop();
}