[Bf-blender-cvs] [596b6e2] master: Code Cleanup: make cpack into a function.
Campbell Barton
noreply at git.blender.org
Sun Dec 1 04:31:40 CET 2013
Commit: 596b6e207eae2e7ea0c95f671a98b432b8f2e8be
Author: Campbell Barton
Date: Sun Dec 1 14:30:22 2013 +1100
http://developer.blender.org/rB596b6e207eae2e7ea0c95f671a98b432b8f2e8be
Code Cleanup: make cpack into a function.
===================================================================
M source/blender/editors/include/BIF_gl.h
M source/blender/editors/screen/glutil.c
===================================================================
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index cdf9b71..a3d3d8f 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -53,7 +53,7 @@
* color, while not being endian-sensitive. On little-endians, this
* is the same as doing a 'naive' indexing, on big-endian, it is not!
* */
-#define cpack(x) glColor3ub( ((x) & 0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF) )
+void cpack(unsigned int x);
#define glMultMatrixf(x) glMultMatrixf( (float *)(x))
#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x))
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 5c9778d..f02cb4a 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -1157,3 +1157,10 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
glaDrawImBuf_glsl(ibuf, x, y, zoomfilter, view_settings, display_settings);
}
+
+void cpack(unsigned int x)
+{
+ glColor3ub( ( (x) & 0xFF),
+ (((x) >> 8) & 0xFF),
+ (((x) >> 16) & 0xFF) );
+}
More information about the Bf-blender-cvs
mailing list