mesa: remove GL_SGI_texture_color_table support
[mesa.git] / src / mesa / main / colortab.c
index 6295dc88deef76ce9b7db01ad6a946841484098d..026fa48786dc89c3e3f2cda64741133bfbed9fcd 100644 (file)
@@ -29,6 +29,9 @@
 #include "context.h"
 #include "image.h"
 #include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
+#include "pack.h"
 #include "state.h"
 #include "teximage.h"
 #include "texstate.h"
@@ -297,23 +300,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
       case GL_SHARED_TEXTURE_PALETTE_EXT:
          table = &ctx->Texture.Palette;
          break;
-      case GL_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
-            return;
-         }
-         table = &(texUnit->ColorTable);
-         scale = ctx->Pixel.TextureColorTableScale;
-         bias = ctx->Pixel.TextureColorTableBias;
-         break;
-      case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
-            return;
-         }
-         table = &(texUnit->ProxyColorTable);
-         proxy = GL_TRUE;
-         break;
       default:
          /* try texture targets */
          {
@@ -432,15 +418,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
       case GL_SHARED_TEXTURE_PALETTE_EXT:
          table = &ctx->Texture.Palette;
          break;
-      case GL_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
-            return;
-         }
-         table = &(texUnit->ColorTable);
-         scale = ctx->Pixel.TextureColorTableScale;
-         bias = ctx->Pixel.TextureColorTableBias;
-         break;
       default:
          /* try texture targets */
          texObj = _mesa_select_tex_object(ctx, texUnit, target);
@@ -548,13 +525,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
       case GL_SHARED_TEXTURE_PALETTE_EXT:
          table = &ctx->Texture.Palette;
          break;
-      case GL_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
-            return;
-         }
-         table = &(texUnit->ColorTable);
-         break;
       default:
          /* try texture targets */
          {
@@ -663,10 +633,6 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
    switch (target) {
-   case GL_TEXTURE_COLOR_TABLE_SGI:
-      scale = ctx->Pixel.TextureColorTableScale;
-      bias  = ctx->Pixel.TextureColorTableBias;
-      break;
    default:
       _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)");
       return;
@@ -692,17 +658,7 @@ static void GLAPIENTRY
 _mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
 {
    GLfloat fparams[4];
-   if (pname == GL_TEXTURE_COLOR_TABLE_SGI) {
-      /* four values */
-      fparams[0] = (GLfloat) params[0];
-      fparams[1] = (GLfloat) params[1];
-      fparams[2] = (GLfloat) params[2];
-      fparams[3] = (GLfloat) params[3];
-   }
-   else {
-      /* one values */
-      fparams[0] = (GLfloat) params[0];
-   }
+   fparams[0] = (GLfloat) params[0];
    _mesa_ColorTableParameterfv(target, pname, fparams);
 }
 
@@ -720,28 +676,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
       case GL_SHARED_TEXTURE_PALETTE_EXT:
          table = &ctx->Texture.Palette;
          break;
-      case GL_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
-            return;
-         }
-         table = &(texUnit->ColorTable);
-         if (pname == GL_COLOR_TABLE_SCALE_SGI) {
-            COPY_4V(params, ctx->Pixel.TextureColorTableScale);
-            return;
-         }
-         else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
-            COPY_4V(params, ctx->Pixel.TextureColorTableBias);
-            return;
-         }
-         break;
-      case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
-            return;
-         }
-         table = &(texUnit->ProxyColorTable);
-         break;
       default:
          /* try texture targets */
          {
@@ -805,34 +739,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
       case GL_SHARED_TEXTURE_PALETTE_EXT:
          table = &ctx->Texture.Palette;
          break;
-      case GL_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
-            return;
-         }
-         table = &(texUnit->ColorTable);
-         if (pname == GL_COLOR_TABLE_SCALE_SGI) {
-            params[0] = (GLint) ctx->Pixel.TextureColorTableScale[0];
-            params[1] = (GLint) ctx->Pixel.TextureColorTableScale[1];
-            params[2] = (GLint) ctx->Pixel.TextureColorTableScale[2];
-            params[3] = (GLint) ctx->Pixel.TextureColorTableScale[3];
-            return;
-         }
-         else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
-            params[0] = (GLint) ctx->Pixel.TextureColorTableBias[0];
-            params[1] = (GLint) ctx->Pixel.TextureColorTableBias[1];
-            params[2] = (GLint) ctx->Pixel.TextureColorTableBias[2];
-            params[3] = (GLint) ctx->Pixel.TextureColorTableBias[3];
-            return;
-         }
-         break;
-      case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
-         if (!ctx->Extensions.SGI_texture_color_table) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
-            return;
-         }
-         table = &(texUnit->ProxyColorTable);
-         break;
       default:
          /* Try texture targets */
          {