From 3041d05bbcccfddba01a1eeaba01e5da0e1e99af Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 2 Jan 2001 22:02:51 +0000 Subject: 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. --- src/mesa/drivers/glide/fxdrv.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa/drivers/glide/fxdrv.h') diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index 2f62133221..3e3147e363 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -87,6 +87,16 @@ #define T1COORD GR_VERTEX_TOW_TMU1_OFFSET +extern float gl_ubyte_to_float_255_color_tab[256]; +#define UBYTE_COLOR_TO_FLOAT_255_COLOR(c) gl_ubyte_to_float_255_color_tab[c] +#define UBYTE_COLOR_TO_FLOAT_255_COLOR2(f,c) \ + (*(int *)&(f)) = ((int *)gl_ubyte_to_float_255_color_tab)[c] + + +#define LINTERP(T, A, B) ((A) + (T) * ((B) - (A))) + + + /* Should have size == 16 * sizeof(float). */ typedef union { -- cgit v1.2.3