diff options
author | Brian Paul <[email protected]> | 2002-10-04 19:10:06 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-10-04 19:10:06 +0000 |
commit | fc80ad6e62fb2b53d53756593099330477a44c52 (patch) | |
tree | 0b47f3ee84d613dfa2264d6f23e5c2a60cecc9ba /src/mesa/main/get.c | |
parent | f782b8189e718974a40d72ac4f6b8d213ca99e1e (diff) |
Changed a number of context fields from GLchan to GLfloat (such as ClearColor).
Also changed parameter types for some driver functions (like ctx->Driver.Clear-
Color). Updated all the device drivers.
Someday, we want to support 8, 16 and 32-bit channels dynamically at runtime.
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r-- | src/mesa/main/get.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 4eee2c9fa76..a952a824b01 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1,4 +1,4 @@ -/* $Id: get.c,v 1.92 2002/09/27 02:45:37 brianp Exp $ */ +/* $Id: get.c,v 1.93 2002/10/04 19:10:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -173,7 +173,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ENUM_TO_BOOL(ctx->Color.AlphaFunc); break; case GL_ALPHA_TEST_REF: - *params = FLOAT_TO_BOOL((GLfloat) ctx->Color.AlphaRef / CHAN_MAXF); + *params = ctx->Color.AlphaRef ? GL_TRUE : GL_FALSE; break; case GL_ATTRIB_STACK_DEPTH: *params = INT_TO_BOOL(ctx->AttribStackDepth); @@ -1537,7 +1537,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = ENUM_TO_DOUBLE(ctx->Color.AlphaFunc); break; case GL_ALPHA_TEST_REF: - *params = (GLdouble) ctx->Color.AlphaRef / CHAN_MAXF; + *params = (GLdouble) ctx->Color.AlphaRef; break; case GL_ATTRIB_STACK_DEPTH: *params = (GLdouble ) (ctx->AttribStackDepth); @@ -1602,10 +1602,10 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = 0.0; break; case GL_COLOR_CLEAR_VALUE: - 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]); + 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]; break; case GL_COLOR_MATERIAL: *params = (GLdouble) ctx->Light.ColorMaterialEnabled; @@ -2898,7 +2898,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = ENUM_TO_FLOAT(ctx->Color.AlphaFunc); break; case GL_ALPHA_TEST_REF: - *params = (GLfloat) ctx->Color.AlphaRef / CHAN_MAXF; + *params = (GLfloat) ctx->Color.AlphaRef; break; case GL_ATTRIB_STACK_DEPTH: *params = (GLfloat) (ctx->AttribStackDepth); @@ -2963,10 +2963,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = 0.0; break; case GL_COLOR_CLEAR_VALUE: - 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]); + params[0] = ctx->Color.ClearColor[0]; + params[1] = ctx->Color.ClearColor[1]; + params[2] = ctx->Color.ClearColor[2]; + params[3] = ctx->Color.ClearColor[3]; break; case GL_COLOR_MATERIAL: *params = (GLfloat) ctx->Light.ColorMaterialEnabled; @@ -4233,7 +4233,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Color.AlphaEnabled; break; case GL_ALPHA_TEST_REF: - *params = FLOAT_TO_INT( (GLfloat) ctx->Color.AlphaRef / CHAN_MAXF ); + *params = FLOAT_TO_INT(ctx->Color.AlphaRef); break; case GL_ALPHA_TEST_FUNC: *params = (GLint) ctx->Color.AlphaFunc; |