summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/colormac.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-14 08:09:05 -0600
committerBrian Paul <brianp@vmware.com>2011-09-14 08:15:59 -0600
commit4fc50d457065b974a7cfc3e63ab2a6da77490559 (patch)
tree71f55eee7cd5882b3e5e5930eb02a28c6f94afe5 /src/mesa/main/colormac.h
parent4d21ecde7702852f30a4f3b90af0e9811b230c63 (diff)
downloadexternal_mesa3d-4fc50d457065b974a7cfc3e63ab2a6da77490559.zip
external_mesa3d-4fc50d457065b974a7cfc3e63ab2a6da77490559.tar.gz
external_mesa3d-4fc50d457065b974a7cfc3e63ab2a6da77490559.tar.bz2
mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()
Add a comment and reformat to be under 80 columns.
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r--src/mesa/main/colormac.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 923c5a3..4b7c3b4 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -168,13 +168,19 @@ do { \
UNCLAMPED_FLOAT_TO_CHAN((dst)[3], (f)[3]); \
} while (0)
-static inline void _mesa_unclamped_float_rgba_to_ubyte(GLubyte dst[4], const GLfloat src[4])
+
+/**
+ * Convert four float values in [0,1] to ubytes in [0,255] with clamping.
+ */
+static inline void
+_mesa_unclamped_float_rgba_to_ubyte(GLubyte dst[4], const GLfloat src[4])
{
int i;
for (i = 0; i < 4; i++)
UNCLAMPED_FLOAT_TO_UBYTE(dst[i], src[i]);
}
+
/**
* \name Generic color packing macros. All inputs should be GLubytes.
*