diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-02-28 19:34:05 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-02-28 19:34:05 +0000 |
commit | aaad687d510b3c933e4ca532e1c12ec723d33588 (patch) | |
tree | 225cc7a6350d32e04f92612bfc4b94d849820186 /src/mesa/swrast | |
parent | d14da2d5aefaaef6afb864098c15c6fc3ca746ee (diff) |
replace color table FloatTable boolean with Type enum
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 496812f203..5dff9874d5 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -346,6 +346,7 @@ repeat_remainder(GLint a, GLint b) /* * Do the lookup for GL_SGI_texture_color_table. + * XXX merge with _mesa_lookup_rgba in pixel.c */ void _swrast_texture_table_lookup(const struct gl_color_table *table, @@ -357,7 +358,7 @@ _swrast_texture_table_lookup(const struct gl_color_table *table, switch (table->Format) { case GL_INTENSITY: /* replace RGBA with I */ - if (table->FloatTable) { + if (table->Type == GL_FLOAT) { const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF; const GLfloat *lut = (const GLfloat *) table->Table; GLuint i; @@ -397,7 +398,7 @@ _swrast_texture_table_lookup(const struct gl_color_table *table, break; case GL_LUMINANCE: /* replace RGB with L */ - if (table->FloatTable) { + if (table->Type == GL_FLOAT) { const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF; const GLfloat *lut = (const GLfloat *) table->Table; GLuint i; @@ -434,7 +435,7 @@ _swrast_texture_table_lookup(const struct gl_color_table *table, break; case GL_ALPHA: /* replace A with A */ - if (table->FloatTable) { + if (table->Type == GL_FLOAT) { const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF; const GLfloat *lut = (const GLfloat *) table->Table; GLuint i; @@ -470,7 +471,7 @@ _swrast_texture_table_lookup(const struct gl_color_table *table, break; case GL_LUMINANCE_ALPHA: /* replace RGBA with LLLA */ - if (table->FloatTable) { + if (table->Type == GL_FLOAT) { const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF; const GLfloat *lut = (const GLfloat *) table->Table; GLuint i; @@ -516,7 +517,7 @@ _swrast_texture_table_lookup(const struct gl_color_table *table, break; case GL_RGB: /* replace RGB with RGB */ - if (table->FloatTable) { + if (table->Type == GL_FLOAT) { const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF; const GLfloat *lut = (const GLfloat *) table->Table; GLuint i; @@ -560,7 +561,7 @@ _swrast_texture_table_lookup(const struct gl_color_table *table, break; case GL_RGBA: /* replace RGBA with RGBA */ - if (table->FloatTable) { + if (table->Type == GL_FLOAT) { const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF; const GLfloat *lut = (const GLfloat *) table->Table; GLuint i; @@ -627,12 +628,12 @@ palette_sample(const GLcontext *ctx, GLenum format; if (ctx->Texture.SharedPalette) { - ASSERT(!ctx->Texture.Palette.FloatTable); + ASSERT(ctx->Texture.Palette.Type != GL_FLOAT); palette = (const GLchan *) ctx->Texture.Palette.Table; format = ctx->Texture.Palette.Format; } else { - ASSERT(!tObj->Palette.FloatTable); + ASSERT(tObj->Palette.Type != GL_FLOAT); palette = (const GLchan *) tObj->Palette.Table; format = tObj->Palette.Format; } |