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 15:24:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-06 15:24:43 +0400
commit27da686aece8940aedcd99ac9f8a08f63af7f539 (patch)
treed7a9cf04429eefba8580323f984209e80d73fffe /source/blender/editors
parentf058a3dd42aa5f6f42f650436d8d41aa52ad9cce (diff)
use icons for rgb colors
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/drawnode.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 5596e9151c7..218d11f3035 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2954,13 +2954,15 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
if (snode->flag & (SNODE_SHOW_R | SNODE_SHOW_G | SNODE_SHOW_B)) {
int ofs;
+#ifdef __BIG_ENDIAN__
+ if (snode->flag & SNODE_SHOW_R) ofs = 2;
+ else if (snode->flag & SNODE_SHOW_G) ofs = 1;
+ else ofs = 0;
+#else
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;
- }
+#endif
glPixelZoom(snode->zoom, snode->zoom);
/* swap bytes, so alpha is most significant one, then just draw it as luminance int */
@@ -2972,12 +2974,14 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
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)
- glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
-
+#ifdef __BIG_ENDIAN__
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
+#endif
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_LUMINANCE, GL_UNSIGNED_INT, ibuf->rect);
-
+
+#ifdef __BIG_ENDIAN__
glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
+#endif
glPixelZoom(1.0f, 1.0f);
}
else if (snode->flag & SNODE_USE_ALPHA) {