diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-06 22:00:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-06 22:00:08 +0400 |
commit | b53b03ac1c9bbc194c2ac1f255f8017f1a78bdd2 (patch) | |
tree | edb05a3bbd7e187ff94c936cdab4985bc36034fe /source/blender/blenlib/intern/math_color_inline.c | |
parent | 47c96b6e402f23afeb2ee577745b1e9f0e1ae085 (diff) |
pass the object wire color along to drawing functions, too many places would use glGetFloatv(GL_CURRENT_COLOR, curcol), which also become confusing to debug if in some cases the color was set beforehand.
Diffstat (limited to 'source/blender/blenlib/intern/math_color_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color_inline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index 243e9fc8a57..b2a87a91433 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -215,4 +215,11 @@ MINLINE void rgba_char_args_test_set(char col[4], const char r, const char g, co } } +MINLINE void cpack_cpy_3ub(unsigned char r_col[3], const unsigned int pack) +{ + r_col[0] = ((pack) >> 0) & 0xFF; + r_col[1] = ((pack) >> 8) & 0xFF; + r_col[2] = ((pack) >> 16) & 0xFF; +} + #endif /* __MATH_COLOR_INLINE_C__ */ |