summaryrefslogtreecommitdiff
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-10-28 20:41:13 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-10-28 20:41:13 +0000
commitc893a015d8a50a38cd3f727d99835e7e7e2ccea9 (patch)
tree49ceb3610b183301b64916d54fd74d13a5c3a31c /src/mesa/main/drawpix.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/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 177458c9ea..6e1f6e0a09 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.39 2000/10/27 16:44:40 keithw Exp $ */
+/* $Id: drawpix.c,v 1.40 2000/10/28 20:41:13 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 "convolve.h"
#include "drawpix.h"
@@ -916,7 +917,10 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
if (ctx->Current.RasterPosValid) {
GLfloat color[4];
GLfloat texcoord[4], invq;
- UBYTE_RGBA_TO_FLOAT_RGBA(color, ctx->Current.ByteColor);
+ color[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
+ color[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
+ color[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
+ color[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
invq = 1.0F / ctx->Current.Texcoord[0][3];
texcoord[0] = ctx->Current.Texcoord[0][0] * invq;
texcoord[1] = ctx->Current.Texcoord[0][1] * invq;