diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate_util.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate_util.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c index 152f1f3dd98..40da4cf091b 100644 --- a/source/blender/gpu/intern/gpu_immediate_util.c +++ b/source/blender/gpu/intern/gpu_immediate_util.c @@ -34,12 +34,16 @@ #include "GPU_matrix.h" /** -* Pack color into 3 bytes -* -* \Note BGR format (i.e. 0xBBGGRR)... -* -* \param x color. -*/ + * Pack color into 3 bytes + * + * This define converts a numerical value to the equivalent 24-bit + * color, while not being endian-sensitive. On little-endians, this + * is the same as doing a 'naive' indexing, on big-endian, it is not! + * + * \note BGR format (i.e. 0xBBGGRR)... + * + * \param x color. + */ void imm_cpack(unsigned int x) { immUniformColor3ub(((x) & 0xFF), |