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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-06 13:22:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-06 13:22:59 +0400
commit3b559c8cc86fab02609556d2bbdd92aa3d1c3cba (patch)
treed2ac214f64be5257fa1780da0b6efaf57759dc75 /source/blender/editors/space_node/drawnode.c
parent1b6a4c1c9b89996ab2a5d0b228592448730a2c30 (diff)
rgb color display options for compo backdrop.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index daab0ce0f5f..5596e9151c7 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2951,7 +2951,25 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
}
if (ibuf->rect) {
- if (snode->flag & SNODE_SHOW_ALPHA) {
+ if (snode->flag & (SNODE_SHOW_R | SNODE_SHOW_G | SNODE_SHOW_B)) {
+ int ofs;
+
+ if (snode->flag & SNODE_SHOW_R) ofs = 1;
+ else if (snode->flag & SNODE_SHOW_G) ofs = 2;
+ else ofs = 3;
+
+ if (ENDIAN_ORDER == B_ENDIAN) {
+ ofs = 3 - ofs;
+ }
+
+ glPixelZoom(snode->zoom, snode->zoom);
+ /* swap bytes, so alpha is most significant one, then just draw it as luminance int */
+
+ glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_LUMINANCE, GL_UNSIGNED_INT, ((unsigned char *)ibuf->rect) + ofs);
+
+ glPixelZoom(1.0f, 1.0f);
+ }
+ else if (snode->flag & SNODE_SHOW_ALPHA) {
glPixelZoom(snode->zoom, snode->zoom);
/* swap bytes, so alpha is most significant one, then just draw it as luminance int */
if (ENDIAN_ORDER == B_ENDIAN)