From ba643a2094a1e844b6ce60f468057057557859ce Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 28 Oct 2000 18:34:48 +0000 Subject: Basic work to support deep color channels: Replace GLubyte with GLchan Replace 255 with CHAN_MAX --- src/mesa/main/pixel.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/mesa/main/pixel.c') diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index a0218e1042..703d129444 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; -- cgit v1.2.3