summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-10-28 20:41:13 +0000
committerBrian Paul <[email protected]>2000-10-28 20:41:13 +0000
commitc893a015d8a50a38cd3f727d99835e7e7e2ccea9 (patch)
tree49ceb3610b183301b64916d54fd74d13a5c3a31c /src/mesa/main/get.c
parentba643a2094a1e844b6ce60f468057057557859ce (diff)
New colormac.h file for color-related macros.
Lot's of clean-up in macros.h and mmath.h
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 9876f4951b3..9123138caa5 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,4 +1,4 @@
-/* $Id: get.c,v 1.36 2000/10/28 18:34:48 brianp Exp $ */
+/* $Id: get.c,v 1.37 2000/10/28 20:41:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -29,6 +29,7 @@
#include "all.h"
#else
#include "glheader.h"
+#include "colormac.h"
#include "context.h"
#include "enable.h"
#include "enums.h"
@@ -1418,10 +1419,10 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = ENUM_TO_DOUBLE(ctx->Polygon.CullFaceMode);
break;
case GL_CURRENT_COLOR:
- params[0] = CHAN_COLOR_TO_FLOAT_COLOR(ctx->Current.ByteColor[0]);
- params[1] = CHAN_COLOR_TO_FLOAT_COLOR(ctx->Current.ByteColor[1]);
- params[2] = CHAN_COLOR_TO_FLOAT_COLOR(ctx->Current.ByteColor[2]);
- params[3] = CHAN_COLOR_TO_FLOAT_COLOR(ctx->Current.ByteColor[3]);
+ params[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
+ params[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
+ params[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
+ params[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
break;
case GL_CURRENT_INDEX:
*params = (GLdouble) ctx->Current.Index;
@@ -2610,7 +2611,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
break;
case GL_CURRENT_COLOR:
- CHAN_RGBA_TO_FLOAT_RGBA(params, ctx->Current.ByteColor);
+ params[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
+ params[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
+ params[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
+ params[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
break;
case GL_CURRENT_INDEX:
*params = (GLfloat) ctx->Current.Index;
@@ -3775,10 +3779,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Polygon.CullFaceMode;
break;
case GL_CURRENT_COLOR:
- params[0] = FLOAT_TO_INT( CHAN_COLOR_TO_FLOAT_COLOR( ctx->Current.ByteColor[0] ) );
- params[1] = FLOAT_TO_INT( CHAN_COLOR_TO_FLOAT_COLOR( ctx->Current.ByteColor[1] ) );
- params[2] = FLOAT_TO_INT( CHAN_COLOR_TO_FLOAT_COLOR( ctx->Current.ByteColor[2] ) );
- params[3] = FLOAT_TO_INT( CHAN_COLOR_TO_FLOAT_COLOR( ctx->Current.ByteColor[3] ) );
+ params[0] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[0] ) );
+ params[1] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[1] ) );
+ params[2] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[2] ) );
+ params[3] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[3] ) );
break;
case GL_CURRENT_INDEX:
*params = (GLint) ctx->Current.Index;