summaryrefslogtreecommitdiff
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-01-02 22:02:51 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-01-02 22:02:51 +0000
commit3041d05bbcccfddba01a1eeaba01e5da0e1e99af (patch)
treee25361e01fdf7be6d75713235c7e130246be67f1 /src/mesa/main/image.c
parent8446d1bab15ef82b35b8980a0a56072ace6feb04 (diff)
Removed fixed.h (GLfixed now in mtypes.h, fixed-pt macros in mmath.h)
Clean-up of color conversion macros. New mmath.h macros (IROUND, IFLOOR, ICEIL, FRAC) used in various places.
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index f2003ccfbe..6c50fed23e 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.50 2000/11/28 00:07:51 brianp Exp $ */
+/* $Id: image.c,v 1.51 2001/01/02 22:02:51 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2337,10 +2337,10 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p ) & 0xff);
- rgba[i][gComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
}
}
else {
@@ -2348,10 +2348,10 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
- rgba[i][gComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p ) & 0xff);
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
}
}
break;
@@ -2361,10 +2361,10 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
- rgba[i][gComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p ) & 0xff);
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
}
}
else {
@@ -2372,10 +2372,10 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p ) & 0xff);
- rgba[i][gComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
}
}
break;