summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-01-24 00:04:58 +0000
committerBrian Paul <[email protected]>2001-01-24 00:04:58 +0000
commit74b493a5e61237de081a438e774e5d8139d4c6b7 (patch)
treea8bc94a65bacc67b9b1473f91a2bd84cd2b25937 /src/mesa/main/texstate.c
parent125fddc31dc9959901d9f1ece693b09f04426d48 (diff)
Lots of GLchan datatype changes.
Added GLvector4us datatype in math/m_vector.[ch] Added _math_trans_4us() in math/m_translate.[ch] Choose GLvector4ub, GLvector4us, GLvector4f at compile time based on CHAN_BITS. Made Driver.ClearColor() and Driver.ClearIndex() optional driver functions. Changed args to Driver.ClearColor(), updated drivers. Reordered files in Makefile.X11
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 9bf4bbb3c87..ced3940b651 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.27 2001/01/06 22:46:13 gareth Exp $ */
+/* $Id: texstate.c,v 1.28 2001/01/24 00:04:58 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -743,10 +743,10 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
}
break;
case GL_TEXTURE_BORDER_COLOR:
- texObj->BorderColor[0] = (GLchan) CLAMP((GLint)(params[0]*CHAN_MAXF), 0, CHAN_MAX);
- texObj->BorderColor[1] = (GLchan) CLAMP((GLint)(params[1]*CHAN_MAXF), 0, CHAN_MAX);
- texObj->BorderColor[2] = (GLchan) CLAMP((GLint)(params[2]*CHAN_MAXF), 0, CHAN_MAX);
- texObj->BorderColor[3] = (GLchan) CLAMP((GLint)(params[3]*CHAN_MAXF), 0, CHAN_MAX);
+ UNCLAMPED_FLOAT_TO_CHAN(texObj->BorderColor[0], params[0]);
+ UNCLAMPED_FLOAT_TO_CHAN(texObj->BorderColor[1], params[1]);
+ UNCLAMPED_FLOAT_TO_CHAN(texObj->BorderColor[2], params[2]);
+ UNCLAMPED_FLOAT_TO_CHAN(texObj->BorderColor[3], params[3]);
break;
case GL_TEXTURE_MIN_LOD:
texObj->MinLod = params[0];