diff options
author | Brian Paul <[email protected]> | 2010-05-09 19:25:52 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-05-09 21:19:42 -0600 |
commit | 6274bb865fcb00bdb888f4388f7a6de825f14723 (patch) | |
tree | 031e734a3b120622eab26739669283d4df5b9a8f | |
parent | 880e04ba74603eda3480006f21bc8c2b24ac2f8c (diff) |
mesa: added UNCLAMPED_FLOAT_TO_SHORT macro
-rw-r--r-- | src/mesa/main/macros.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index a8624574de4..40e17e53d6c 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -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) ) + /*@}*/ |