diff options
author | Brian Paul <[email protected]> | 2001-01-24 00:04:58 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-01-24 00:04:58 +0000 |
commit | 74b493a5e61237de081a438e774e5d8139d4c6b7 (patch) | |
tree | a8bc94a65bacc67b9b1473f91a2bd84cd2b25937 /src/mesa/main/get.c | |
parent | 125fddc31dc9959901d9f1ece693b09f04426d48 (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/get.c')
-rw-r--r-- | src/mesa/main/get.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index ecbb16f0433..d9b046556f3 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1,4 +1,4 @@ -/* $Id: get.c,v 1.50 2001/01/23 23:39:36 brianp Exp $ */ +/* $Id: get.c,v 1.51 2001/01/24 00:04:58 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -200,10 +200,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Transform.ClipEnabled[pname-GL_CLIP_PLANE0]; break; case GL_COLOR_CLEAR_VALUE: - params[0] = FLOAT_TO_BOOL(ctx->Color.ClearColor[0]); - params[1] = FLOAT_TO_BOOL(ctx->Color.ClearColor[1]); - params[2] = FLOAT_TO_BOOL(ctx->Color.ClearColor[2]); - params[3] = FLOAT_TO_BOOL(ctx->Color.ClearColor[3]); + params[0] = ctx->Color.ClearColor[0] ? GL_TRUE : GL_FALSE; + params[1] = ctx->Color.ClearColor[1] ? GL_TRUE : GL_FALSE; + params[2] = ctx->Color.ClearColor[2] ? GL_TRUE : GL_FALSE; + params[3] = ctx->Color.ClearColor[3] ? GL_TRUE : GL_FALSE; break; case GL_COLOR_MATERIAL: *params = ctx->Light.ColorMaterialEnabled; @@ -1438,10 +1438,10 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Transform.ClipEnabled[pname-GL_CLIP_PLANE0]; break; case GL_COLOR_CLEAR_VALUE: - params[0] = (GLdouble) ctx->Color.ClearColor[0]; - params[1] = (GLdouble) ctx->Color.ClearColor[1]; - params[2] = (GLdouble) ctx->Color.ClearColor[2]; - params[3] = (GLdouble) ctx->Color.ClearColor[3]; + params[0] = (GLdouble) CHAN_TO_FLOAT(ctx->Color.ClearColor[0]); + params[1] = (GLdouble) CHAN_TO_FLOAT(ctx->Color.ClearColor[1]); + params[2] = (GLdouble) CHAN_TO_FLOAT(ctx->Color.ClearColor[2]); + params[3] = (GLdouble) CHAN_TO_FLOAT(ctx->Color.ClearColor[3]); break; case GL_COLOR_MATERIAL: *params = (GLdouble) ctx->Light.ColorMaterialEnabled; @@ -2676,10 +2676,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Transform.ClipEnabled[pname-GL_CLIP_PLANE0]; break; case GL_COLOR_CLEAR_VALUE: - params[0] = (GLfloat) ctx->Color.ClearColor[0]; - params[1] = (GLfloat) ctx->Color.ClearColor[1]; - params[2] = (GLfloat) ctx->Color.ClearColor[2]; - params[3] = (GLfloat) ctx->Color.ClearColor[3]; + params[0] = CHAN_TO_FLOAT(ctx->Color.ClearColor[0]); + params[1] = CHAN_TO_FLOAT(ctx->Color.ClearColor[1]); + params[2] = CHAN_TO_FLOAT(ctx->Color.ClearColor[2]); + params[3] = CHAN_TO_FLOAT(ctx->Color.ClearColor[3]); break; case GL_COLOR_MATERIAL: *params = (GLfloat) ctx->Light.ColorMaterialEnabled; @@ -3890,10 +3890,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Transform.ClipEnabled[i]; break; case GL_COLOR_CLEAR_VALUE: - params[0] = FLOAT_TO_INT( ctx->Color.ClearColor[0] ); - params[1] = FLOAT_TO_INT( ctx->Color.ClearColor[1] ); - params[2] = FLOAT_TO_INT( ctx->Color.ClearColor[2] ); - params[3] = FLOAT_TO_INT( ctx->Color.ClearColor[3] ); + params[0] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[0]) ); + params[1] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[1]) ); + params[2] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[2]) ); + params[3] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[3]) ); break; case GL_COLOR_MATERIAL: *params = (GLint) ctx->Light.ColorMaterialEnabled; |