From 4420369d700d9db1563f8647e1889c6a0972ea2c Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 15 Sep 2011 15:01:30 +0200 Subject: libxtrans libXmu libXext mesa pixman git update 15 sept 2011 --- mesalib/src/mesa/main/colormac.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mesalib/src/mesa/main/colormac.h') diff --git a/mesalib/src/mesa/main/colormac.h b/mesalib/src/mesa/main/colormac.h index d308c48b6..4b7c3b4a0 100644 --- a/mesalib/src/mesa/main/colormac.h +++ b/mesalib/src/mesa/main/colormac.h @@ -169,6 +169,17 @@ do { \ } while (0) +/** + * 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. -- cgit v1.2.3