Code Cleanup: make cpack into a function.

This commit is contained in:
2013-12-01 14:30:22 +11:00
parent ac38f2584f
commit 596b6e207e
2 changed files with 8 additions and 1 deletions

View File

@@ -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))

View File

@@ -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) );
}