diff options
author | Brian Paul <[email protected]> | 2001-01-02 22:02:51 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-01-02 22:02:51 +0000 |
commit | 3041d05bbcccfddba01a1eeaba01e5da0e1e99af (patch) | |
tree | e25361e01fdf7be6d75713235c7e130246be67f1 /src/mesa/math | |
parent | 8446d1bab15ef82b35b8980a0a56072ace6feb04 (diff) |
Removed fixed.h (GLfixed now in mtypes.h, fixed-pt macros in mmath.h)
Clean-up of color conversion macros.
New mmath.h macros (IROUND, IFLOOR, ICEIL, FRAC) used in various places.
Diffstat (limited to 'src/mesa/math')
-rw-r--r-- | src/mesa/math/m_trans_tmp.h | 4 | ||||
-rw-r--r-- | src/mesa/math/m_translate.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/math/m_trans_tmp.h b/src/mesa/math/m_trans_tmp.h index 952fde55942..e7d8a880719 100644 --- a/src/mesa/math/m_trans_tmp.h +++ b/src/mesa/math/m_trans_tmp.h @@ -1,8 +1,8 @@ -/* $Id: m_trans_tmp.h,v 1.1 2000/11/16 21:05:41 keithw Exp $ */ +/* $Id: m_trans_tmp.h,v 1.2 2001/01/02 22:02:52 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.1 + * Version: 3.5 * * Copyright (C) 1999 Brian Paul All Rights Reserved. * diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c index 1a0804ab60a..1f22b5a0bcb 100644 --- a/src/mesa/math/m_translate.c +++ b/src/mesa/math/m_translate.c @@ -1,4 +1,4 @@ -/* $Id: m_translate.c,v 1.2 2000/12/26 05:09:31 keithw Exp $ */ +/* $Id: m_translate.c,v 1.3 2001/01/02 22:02:52 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -110,6 +110,8 @@ static trans_4f_func _math_trans_4f_tab[5][MAX_TYPES]; /* GL_BYTE */ +#define BYTE_TO_UBYTE(b) (b < 0 ? 0 : (GLubyte) b) + #define SRC GLbyte #define SRC_IDX TYPE_IDX(GL_BYTE) #define TRX_3F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) ) @@ -362,7 +364,7 @@ static trans_4f_func _math_trans_4f_tab[5][MAX_TYPES]; #define SRC_IDX TYPE_IDX(GL_DOUBLE) #define TRX_3F(f,n) PTR_ELT(f,n) #define TRX_4F(f,n) PTR_ELT(f,n) -#define TRX_UB(ub,f,n) FLOAT_COLOR_TO_CHAN(ub, PTR_ELT(f,n)) +#define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_CHAN(ub, PTR_ELT(f,n)) #define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n) #define TRX_1F(f,n) PTR_ELT(f,n) |