diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-08 19:34:33 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-08 19:34:33 +0400 |
commit | 0c1d1e6c30e8f11834d401b46bdc2018a4e942d9 (patch) | |
tree | 0272e125ae8e03fc0331052733481a113cd5f012 /source/blender/editors/space_sequencer | |
parent | 472595f1d3533f143bdc84700b26f20a7b2ba1c1 (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.c | 5 |
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) { |