diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-04-04 16:51:52 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-04-04 16:51:52 +0000 |
commit | 1d84421b7e29079e25689185edcff62e7ba42e0a (patch) | |
tree | 1683f4f5f539288ae8c460915be5f1af16395cf0 /src/mesa/main/colormac.h | |
parent | 6b50a004ffb885dd86dd611979348bdf69b1151c (diff) | |
download | external_mesa3d-1d84421b7e29079e25689185edcff62e7ba42e0a.zip external_mesa3d-1d84421b7e29079e25689185edcff62e7ba42e0a.tar.gz external_mesa3d-1d84421b7e29079e25689185edcff62e7ba42e0a.tar.bz2 |
fixup float/ushort conversion macros
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r-- | src/mesa/main/colormac.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h index 9b41a06..7fdd0b3 100644 --- a/src/mesa/main/colormac.h +++ b/src/mesa/main/colormac.h @@ -1,10 +1,10 @@ -/* $Id: colormac.h,v 1.10 2001/07/16 15:54:23 brianp Exp $ */ +/* $Id: colormac.h,v 1.11 2002/04/04 16:51:52 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -74,10 +74,8 @@ #define CHAN_TO_UBYTE(c) ((c) >> 8) #define CHAN_TO_FLOAT(c) ((GLfloat) ((c) * (1.0 / CHAN_MAXF))) -#define CLAMPED_FLOAT_TO_CHAN(c, f) \ - c = ((GLchan) IROUND((f) * CHAN_MAXF)) -#define UNCLAMPED_FLOAT_TO_CHAN(c, f) \ - c = ( (GLchan) IROUND( CLAMP(f, 0.0, 1.0) * CHAN_MAXF) ) +#define CLAMPED_FLOAT_TO_CHAN(c, f) CLAMPED_FLOAT_TO_USHORT(c, f) +#define UNCLAMPED_FLOAT_TO_CHAN(c, f) UNCLAMPED_FLOAT_TO_USHORT(c, f) #define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) |