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-09-03 11:37:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-03 11:37:38 +0400
commitd248f94cf8b3a715297f3e512d0b10c7d7b7a0c1 (patch)
tree71275d90db69d9f434d69bc0422486dd35830fca /source/blender/editors/space_view3d/view3d_draw.c
parentca6fa937d498691faf77fa58f7c6c4128ac05866 (diff)
add endian switch functions to replace macros SWITCH_INT/LONG/SHORT, with BLI_endian_switch_int32/int64/float/double...
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 24395865a5e..d7e61d0bff3 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -48,6 +48,7 @@
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLI_endian_switch.h"
#include "BKE_anim.h"
#include "BKE_camera.h"
@@ -1397,7 +1398,9 @@ unsigned int view3d_sample_backbuf(ViewContext *vc, int x, int y)
glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col);
glReadBuffer(GL_BACK);
- if (ENDIAN_ORDER == B_ENDIAN) SWITCH_INT(col);
+ if (ENDIAN_ORDER == B_ENDIAN) {
+ BLI_endian_switch_uint32(&col);
+ }
return WM_framebuffer_to_index(col);
}