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/main/api_noop.c | |
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/main/api_noop.c')
-rw-r--r-- | src/mesa/main/api_noop.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index bd5c3cd3ea0..e8298186f55 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -151,17 +151,19 @@ void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ) { GET_CURRENT_CONTEXT(ctx); GLubyte *color = ctx->Current.Color; - FLOAT_COLOR_TO_UBYTE_COLOR(color[0], a); - FLOAT_COLOR_TO_UBYTE_COLOR(color[1], b); - FLOAT_COLOR_TO_UBYTE_COLOR(color[2], c); - FLOAT_COLOR_TO_UBYTE_COLOR(color[3], d); + UNCLAMPED_FLOAT_TO_UBYTE(color[0], a); + UNCLAMPED_FLOAT_TO_UBYTE(color[1], b); + UNCLAMPED_FLOAT_TO_UBYTE(color[2], c); + UNCLAMPED_FLOAT_TO_UBYTE(color[3], d); } void _mesa_noop_Color4fv( const GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); GLubyte *color = ctx->Current.Color; - FLOAT_RGBA_TO_CHAN_RGBA( color, v ); + UNCLAMPED_FLOAT_TO_CHAN(color[0], v[0]); + UNCLAMPED_FLOAT_TO_CHAN(color[1], v[1]); + UNCLAMPED_FLOAT_TO_CHAN(color[2], v[2]); } void _mesa_noop_Color3ub( GLubyte a, GLubyte b, GLubyte c ) @@ -188,9 +190,9 @@ void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c ) { GET_CURRENT_CONTEXT(ctx); GLubyte *color = ctx->Current.Color; - FLOAT_COLOR_TO_UBYTE_COLOR(color[0], a); - FLOAT_COLOR_TO_UBYTE_COLOR(color[1], b); - FLOAT_COLOR_TO_UBYTE_COLOR(color[2], c); + UNCLAMPED_FLOAT_TO_UBYTE(color[0], a); + UNCLAMPED_FLOAT_TO_UBYTE(color[1], b); + UNCLAMPED_FLOAT_TO_UBYTE(color[2], c); color[3] = 255; } @@ -198,7 +200,9 @@ void _mesa_noop_Color3fv( const GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); GLubyte *color = ctx->Current.Color; - FLOAT_RGB_TO_CHAN_RGB( color, v ); + UNCLAMPED_FLOAT_TO_CHAN(color[0], v[0]); + UNCLAMPED_FLOAT_TO_CHAN(color[1], v[1]); + UNCLAMPED_FLOAT_TO_CHAN(color[2], v[2]); color[3] = 255; } @@ -363,9 +367,9 @@ void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c ) { GET_CURRENT_CONTEXT(ctx); GLubyte *color = ctx->Current.SecondaryColor; - FLOAT_COLOR_TO_UBYTE_COLOR(color[0], a); - FLOAT_COLOR_TO_UBYTE_COLOR(color[1], b); - FLOAT_COLOR_TO_UBYTE_COLOR(color[2], c); + UNCLAMPED_FLOAT_TO_UBYTE(color[0], a); + UNCLAMPED_FLOAT_TO_UBYTE(color[1], b); + UNCLAMPED_FLOAT_TO_UBYTE(color[2], c); color[3] = 255; } @@ -373,7 +377,9 @@ void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); GLubyte *color = ctx->Current.SecondaryColor; - FLOAT_RGB_TO_CHAN_RGB( color, v ); + UNCLAMPED_FLOAT_TO_CHAN(color[0], v[0]); + UNCLAMPED_FLOAT_TO_CHAN(color[1], v[1]); + UNCLAMPED_FLOAT_TO_CHAN(color[2], v[2]); color[3] = 255; } |