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/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c8
-rw-r--r--source/blender/editors/space_clip/clip_draw.c18
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c4
-rw-r--r--source/blender/editors/space_clip/clip_utils.c6
-rw-r--r--source/blender/editors/space_clip/space_clip.c4
5 files changed, 14 insertions, 26 deletions
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c
index c7328ae9f8f..8aaf3faffec 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_draw.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c
@@ -142,7 +142,7 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
strip[3] = 0.5f;
selected_strip[3] = 1.0f;
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
clip_draw_dopesheet_background(region, clip, pos_id);
@@ -288,7 +288,7 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
immUnbindProgram();
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
@@ -389,7 +389,7 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
PropertyRNA *chan_prop_lock = RNA_struct_type_find_property(&RNA_MovieTrackingTrack, "lock");
BLI_assert(chan_prop_lock);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
for (channel = dopesheet->channels.first; channel; channel = channel->next) {
float yminc = (float)(y - CHANNEL_HEIGHT_HALF);
float ymaxc = (float)(y + CHANNEL_HEIGHT_HALF);
@@ -426,7 +426,7 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
/* adjust y-position for next one */
y -= CHANNEL_STEP;
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
UI_block_end(C, block);
UI_block_draw(C, block);
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 07bdd337269..17539b2c423 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -153,9 +153,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *region, MovieClip *clip
MovieTrackingPlaneTrack *act_plane_track = BKE_tracking_plane_track_get_active(&clip->tracking);
MovieTrackingReconstruction *reconstruction = BKE_tracking_get_active_reconstruction(tracking);
- GPU_blend(true);
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
/* cache background */
ED_region_cache_draw_background(region);
@@ -245,7 +243,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *region, MovieClip *clip
}
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
/* current frame */
x = (sc->user.framenr - sfra) / (efra - sfra + 1) * region->winx;
@@ -330,9 +328,7 @@ static void draw_movieclip_buffer(const bContext *C,
/* checkerboard for case alpha */
if (ibuf->planes == 32) {
- GPU_blend(true);
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
imm_draw_box_checker_2d(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y);
}
@@ -346,7 +342,7 @@ static void draw_movieclip_buffer(const bContext *C,
ED_draw_imbuf_ctx(C, ibuf, x, y, use_filter, zoomx * width / ibuf->x, zoomy * height / ibuf->y);
if (ibuf->planes == 32) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
if (sc->flag & SC_SHOW_METADATA) {
@@ -1212,9 +1208,7 @@ static void draw_plane_marker_image(Scene *scene,
if (plane_track->image_opacity != 1.0f || ibuf->planes == 32) {
transparent = true;
- GPU_blend(true);
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
}
GPUTexture *texture = GPU_texture_create_nD(ibuf->x,
@@ -1266,7 +1260,7 @@ static void draw_plane_marker_image(Scene *scene,
GPU_texture_free(texture);
if (transparent) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 277930495bd..4cf3e3e0798 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -192,7 +192,7 @@ static void draw_tracks_motion_and_error_curves(View2D *v2d, SpaceClip *sc, uint
}
/* Draw graph lines. */
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
clip_graph_tracking_values_iterate(sc,
(sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
(sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
@@ -200,7 +200,7 @@ static void draw_tracks_motion_and_error_curves(View2D *v2d, SpaceClip *sc, uint
tracking_segment_point_cb,
tracking_segment_start_cb,
tracking_segment_end_cb);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
/* Selected knot handles on top of curves. */
if (draw_knots) {
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index 03f791ad70d..bcbf843f51c 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -415,9 +415,7 @@ void clip_draw_sfra_efra(View2D *v2d, Scene *scene)
UI_view2d_view_ortho(v2d);
/* currently clip editor supposes that editing clip length is equal to scene frame range */
- GPU_blend_set_func_separate(
- GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
- 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);
@@ -426,7 +424,7 @@ void clip_draw_sfra_efra(View2D *v2d, Scene *scene)
immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax);
immRectf(pos, (float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
immUniformThemeColorShade(TH_BACK, -60);
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index d27b80efd40..18df8774e09 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -926,7 +926,6 @@ static void clip_main_region_draw(const bContext *C, ARegion *region)
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
- GPU_clear(GPU_COLOR_BIT);
/* data... */
movieclip_main_area_set_view2d(C, region);
@@ -1054,7 +1053,6 @@ static void graph_region_draw(const bContext *C, ARegion *region)
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
- GPU_clear(GPU_COLOR_BIT);
UI_view2d_view_ortho(v2d);
@@ -1099,7 +1097,6 @@ static void dopesheet_region_draw(const bContext *C, ARegion *region)
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
- GPU_clear(GPU_COLOR_BIT);
UI_view2d_view_ortho(v2d);
@@ -1172,7 +1169,6 @@ static void clip_channels_region_draw(const bContext *C, ARegion *region)
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
- GPU_clear(GPU_COLOR_BIT);
UI_view2d_view_ortho(v2d);