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:
authorMike Erwin <significant.bit@gmail.com>2017-04-16 20:44:34 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-16 20:44:34 +0300
commitaf61b5eb0c1bef93e8df1434b174944e2b40445d (patch)
treedad7dbe831385f038af54037fb21b9655248288a /source/blender/editors/space_sequencer
parentae071305404e61f696f3da46b00bf93aa6a4a5a5 (diff)
cleanup use of immUniformColor
- use best function for the job - don't specify alpha if 100% - 'f' for floating point literals
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 51cce607a1c..e4fe3a6b145 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -258,7 +258,7 @@ static void drawseqwave(View2D *v2d, const bContext *C, SpaceSeq *sseq, Scene *s
return;
}
- immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5);
+ immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5f);
glEnable(GL_BLEND);
@@ -641,7 +641,7 @@ static void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq, u
immUniformColor4ubv(col);
immRectf(pos, (float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1);
- immUniformColor4ub(col[0], col[1], col[2], col[3] + 50);
+ immUniformColor3ubvAlpha(col, col[3] + 50);
imm_draw_line_box(pos, (float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1); /* outline */
}
@@ -649,7 +649,7 @@ static void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq, u
immUniformColor4ubv(col);
immRectf(pos, x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM);
- immUniformColor4ub(col[0], col[1], col[2], col[3] + 50);
+ immUniformColor3ubvAlpha(col, col[3] + 50);
imm_draw_line_box(pos, x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM); /* outline */
}
@@ -1310,7 +1310,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
unsigned int texCoord = VertexFormat_add_attrib(imm_format, "texCoord", COMP_F32, 2, KEEP_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR);
- immUniformColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ immUniformColor3f(1.0f, 1.0f, 1.0f);
immUniform1i("image", GL_TEXTURE0);
immBegin(PRIM_TRIANGLE_FAN, 4);
@@ -1720,7 +1720,7 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
- immUniformColor3f(0.2, 0.2, 0.2);
+ immUniformColor3f(0.2f, 0.2f, 0.2f);
immBegin(PRIM_LINES, 2);
immVertex2f(pos, cfra_over, v2d->cur.ymin);