aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pixel.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-10-28 18:34:48 +0000
committerBrian Paul <[email protected]>2000-10-28 18:34:48 +0000
commitba643a2094a1e844b6ce60f468057057557859ce (patch)
tree27309b7362369d7339290f3702f4b7179be4c690 /src/mesa/main/pixel.c
parenta897b335bec7465ab688ef369c75b468b7251b05 (diff)
Basic work to support deep color channels:
Replace GLubyte with GLchan Replace 255 with CHAN_MAX
Diffstat (limited to 'src/mesa/main/pixel.c')
-rw-r--r--src/mesa/main/pixel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index a0218e10420..703d1294447 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1,4 +1,4 @@
-/* $Id: pixel.c,v 1.13 2000/10/19 20:09:47 brianp Exp $ */
+/* $Id: pixel.c,v 1.14 2000/10/28 18:34:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -745,14 +745,14 @@ void
_mesa_lookup_rgba(const struct gl_color_table *table,
GLuint n, GLfloat rgba[][4])
{
- ASSERT(table->TableType == GL_FLOAT);
+ ASSERT(table->FloatTable);
if (!table->Table)
return;
switch (table->Format) {
case GL_INTENSITY:
/* replace RGBA with I */
- if (table->TableType == GL_UNSIGNED_BYTE) {
+ if (!table->FloatTable) {
const GLfloat scale = (GLfloat) (table->Size - 1);
const GLubyte *lut = (const GLubyte *) table->Table;
GLuint i;
@@ -778,7 +778,7 @@ _mesa_lookup_rgba(const struct gl_color_table *table,
break;
case GL_LUMINANCE:
/* replace RGB with L */
- if (table->TableType == GL_UNSIGNED_BYTE) {
+ if (!table->FloatTable) {
const GLfloat scale = (GLfloat) (table->Size - 1);
const GLubyte *lut = (const GLubyte *) table->Table;
GLuint i;
@@ -801,7 +801,7 @@ _mesa_lookup_rgba(const struct gl_color_table *table,
break;
case GL_ALPHA:
/* replace A with A */
- if (table->TableType == GL_UNSIGNED_BYTE) {
+ if (!table->FloatTable) {
const GLfloat scale = (GLfloat) (table->Size - 1);
const GLubyte *lut = (const GLubyte *) table->Table;
GLuint i;
@@ -822,7 +822,7 @@ _mesa_lookup_rgba(const struct gl_color_table *table,
break;
case GL_LUMINANCE_ALPHA:
/* replace RGBA with LLLA */
- if (table->TableType == GL_UNSIGNED_BYTE) {
+ if (!table->FloatTable) {
const GLfloat scale = (GLfloat) (table->Size - 1);
const GLubyte *lut = (const GLubyte *) table->Table;
GLuint i;
@@ -851,7 +851,7 @@ _mesa_lookup_rgba(const struct gl_color_table *table,
break;
case GL_RGB:
/* replace RGB with RGB */
- if (table->TableType == GL_UNSIGNED_BYTE) {
+ if (!table->FloatTable) {
const GLfloat scale = (GLfloat) (table->Size - 1);
const GLubyte *lut = (const GLubyte *) table->Table;
GLuint i;
@@ -880,7 +880,7 @@ _mesa_lookup_rgba(const struct gl_color_table *table,
break;
case GL_RGBA:
/* replace RGBA with RGBA */
- if (table->TableType == GL_UNSIGNED_BYTE) {
+ if (!table->FloatTable) {
const GLfloat scale = (GLfloat) (table->Size - 1);
const GLubyte *lut = (const GLubyte *) table->Table;
GLuint i;