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_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 77bc8423365..2bc3550413d 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -295,7 +295,7 @@ static void draw_seq_waveform(View2D *v2d,
/* Fcurve lookup is quite expensive, so do this after precondition. */
FCurve *fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "volume", 0, NULL);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
GPUVertFormat *format = immVertexFormat();
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
uint col = GPU_vertformat_attr_add(format, "color", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
@@ -351,7 +351,7 @@ static void draw_seq_waveform(View2D *v2d,
immEnd();
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
@@ -382,8 +382,8 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
offset = 0;
}
- GPU_blend(true);
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
for (seq = seqbase->first; seq; seq = seq->next) {
chan_min = min_ii(chan_min, seq->machine);
@@ -443,7 +443,7 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* Get handle width in pixels. */
@@ -489,9 +489,9 @@ static void draw_seq_handle(View2D *v2d,
}
if (!(seq->type & SEQ_TYPE_EFFECT) || BKE_sequence_effect_get_num_inputs(seq->type) == 0) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
if (seq->flag & whichsel) {
if (seq_active) {
@@ -510,7 +510,7 @@ static void draw_seq_handle(View2D *v2d,
}
immRectf(pos, rx1, y1, rx2, y2);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* Draw numbers for start and end of the strip next to its handles. */
@@ -752,8 +752,8 @@ static void draw_sequence_extensions(Scene *scene, Sequence *seq, uint pos, floa
y1 = seq->machine + SEQ_STRIP_OFSBOTTOM;
y2 = seq->machine + SEQ_STRIP_OFSTOP;
- GPU_blend(true);
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
color3ubv_from_seq(scene, seq, col);
if (seq->flag & SELECT) {
@@ -779,7 +779,7 @@ static void draw_sequence_extensions(Scene *scene, Sequence *seq, uint pos, floa
imm_draw_box_wire_2d(
pos, x2, y2 + pixely, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM);
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static void draw_color_strip_band(Sequence *seq, uint pos, float text_margin_y, float y1)
@@ -789,7 +789,7 @@ static void draw_color_strip_band(Sequence *seq, uint pos, float text_margin_y,
rgb_float_to_uchar(col, colvars->col);
if (seq->flag & SEQ_MUTE) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
col[3] = MUTE_ALPHA;
}
else {
@@ -810,7 +810,7 @@ static void draw_color_strip_band(Sequence *seq, uint pos, float text_margin_y,
immEnd();
if (seq->flag & SEQ_MUTE) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
@@ -841,8 +841,8 @@ static void draw_seq_background(Scene *scene,
}
if (seq->flag & SEQ_MUTE) {
- GPU_blend(true);
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
col[3] = MUTE_ALPHA;
}
@@ -907,13 +907,13 @@ static void draw_seq_background(Scene *scene,
}
if (seq->flag & SEQ_MUTE) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
static void draw_seq_locked(float x1, float y1, float x2, float y2)
{
- 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_DIAG_STRIPES);
@@ -927,12 +927,12 @@ static void draw_seq_locked(float x1, float y1, float x2, float y2)
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static void draw_seq_invalid(float x1, float x2, float y2, float text_margin_y)
{
- 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);
@@ -940,7 +940,7 @@ static void draw_seq_invalid(float x1, float x2, float y2, float text_margin_y)
immRectf(pos, x1, y2, x2, text_margin_y);
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static void calculate_seq_text_offsets(
@@ -1053,13 +1053,13 @@ static void draw_seq_fcurve(
GPU_vertbuf_data_len_set(vbo, vert_count);
GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_UNIFORM_COLOR);
GPU_batch_uniform_4f(batch, "color", 0.0f, 0.0f, 0.0f, 0.15f);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
if (vert_count > 0) {
GPU_batch_draw(batch);
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
GPU_batch_discard(batch);
}
}
@@ -1177,7 +1177,7 @@ static void draw_effect_inputs_highlight(Sequence *seq)
Sequence *seq1 = seq->seq1;
Sequence *seq2 = seq->seq2;
Sequence *seq3 = seq->seq3;
- 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);
@@ -1204,7 +1204,7 @@ static void draw_effect_inputs_highlight(Sequence *seq)
seq3->machine + SEQ_STRIP_OFSTOP);
}
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
void sequencer_special_update_set(Sequence *seq)
@@ -1591,8 +1591,8 @@ static void sequencer_draw_display_buffer(const bContext *C,
void *display_buffer;
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF && sseq->flag & SEQ_USE_ALPHA) {
- GPU_blend(true);
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
}
/* Format needs to be created prior to any immBindShader call.
@@ -1677,7 +1677,7 @@ static void sequencer_draw_display_buffer(const bContext *C,
}
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF && sseq->flag & SEQ_USE_ALPHA) {
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
if (draw_backdrop) {
@@ -1933,7 +1933,7 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region)
else if (last_seq->type == SEQ_TYPE_MULTICAM) {
int channel = last_seq->multicam_source;
if (channel != 0) {
- 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);
@@ -1942,7 +1942,7 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region)
immRectf(pos, v2d->cur.xmin, channel, v2d->cur.xmax, channel + 1);
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
}
@@ -1950,7 +1950,7 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region)
/* Draw highlight if "solo preview" is used. */
if (special_seq_update) {
const Sequence *seq = special_seq_update;
- 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);
@@ -1964,7 +1964,7 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region)
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
}
@@ -1974,7 +1974,7 @@ static void seq_draw_sfra_efra(Scene *scene, View2D *v2d)
const int frame_sta = scene->r.sfra;
const int frame_end = scene->r.efra + 1;
- 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);
@@ -2035,7 +2035,7 @@ static void seq_draw_sfra_efra(Scene *scene, View2D *v2d)
immUnbindProgram();
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
typedef struct CacheDrawData {
@@ -2159,7 +2159,7 @@ static void draw_cache_view(const bContext *C)
return;
}
- 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);
@@ -2246,7 +2246,7 @@ static void draw_cache_view(const bContext *C)
draw_cache_view_batch(
userdata.final_out_vbo, userdata.final_out_vert_count, 1.0f, 0.4f, 0.2f, 0.4f);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* Draw sequencer timeline. */