mesa: added UNCLAMPED_FLOAT_TO_SHORT macro

This commit is contained in:
Brian Paul 2010-05-09 19:25:52 -06:00
parent 880e04ba74
commit 6274bb865f

View file

@ -127,6 +127,9 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
#define CLAMPED_FLOAT_TO_USHORT(us, f) \
us = ( (GLushort) IROUND( (f) * 65535.0F) )
#define UNCLAMPED_FLOAT_TO_SHORT(s, f) \
s = ( (GLshort) IROUND( CLAMP((f), -1.0F, 1.0F) * 32767.0F) )
/*@}*/