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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-01-08 19:34:33 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-08 19:34:33 +0400
commit0c1d1e6c30e8f11834d401b46bdc2018a4e942d9 (patch)
tree0272e125ae8e03fc0331052733481a113cd5f012 /source/blender/editors/space_sequencer
parent472595f1d3533f143bdc84700b26f20a7b2ba1c1 (diff)
Alpha-over images on a black background when in RGB display mode
This is actually a bit arbitrary decision and mainly it preserves compatibility with how images were displaying in previous releases. In fact, we actually would need to think about configurable backdrop color and blending mode to be used for display in RGB mode.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 9e55d95637d..9477b3197fa 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1058,6 +1058,10 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ibuf->x, ibuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, display_buffer);
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
glBegin(GL_QUADS);
if (draw_overlay) {
@@ -1089,6 +1093,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glEnd();
glBindTexture(GL_TEXTURE_2D, last_texid);
glDisable(GL_TEXTURE_2D);
+ glDisable(GL_BLEND);
glDeleteTextures(1, &texid);
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {