aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-01-26 14:37:15 +0000
committerBrian Paul <[email protected]>2003-01-26 14:37:15 +0000
commit45b47d079f6a749c15498a6cef78d891f8acb665 (patch)
tree63f53e25c3ebf3f0320a27ab72f0e13491021c77 /src/mesa/main/enable.c
parent7cac85d00a6110aa92236b2e841faeeb34f684c1 (diff)
Make GL_SGI_texture_color_table work per-texture unit.
Clean-up and optimize _swrast_texture_table_lookup().
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 44c1e14015f..f343c2099a7 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.73 2003/01/21 21:47:49 brianp Exp $ */
+/* $Id: enable.c,v 1.74 2003/01/26 14:37:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -693,10 +693,10 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
break;
case GL_TEXTURE_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_texture_color_table, cap);
- if (ctx->Texture.ColorTableEnabled == state)
+ if (ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- ctx->Texture.ColorTableEnabled = state;
+ ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled = state;
break;
/* GL_EXT_convolution */
@@ -1161,6 +1161,11 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(SGI_color_table);
return ctx->Pixel.PostColorMatrixColorTableEnabled;
+ /* GL_SGI_texture_color_table */
+ case GL_TEXTURE_COLOR_TABLE_SGI:
+ CHECK_EXTENSION(SGI_texture_color_table);
+ return ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
+
/* GL_EXT_convolution */
case GL_CONVOLUTION_1D:
CHECK_EXTENSION(EXT_convolution);