summaryrefslogtreecommitdiff
path: root/src/mesa/main/colortab.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-09-09 16:25:17 -0700
committerEric Anholt <eric@anholt.net>2010-09-23 13:25:45 -0700
commit6c227e57e69158e4da40c69322db0eac4c31086c (patch)
treefef7284f55ac2fe8f865674be3eade9c05edb00e /src/mesa/main/colortab.c
parent7126e38d9037da66fd531c4cb02b3843b68b84ff (diff)
mesa: Remove SGI_color_table.
Another optional ARB_imaging subset extension.
Diffstat (limited to 'src/mesa/main/colortab.c')
-rw-r--r--src/mesa/main/colortab.c204
1 files changed, 1 insertions, 203 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 52d5badf39..5c2697d40a 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -297,15 +297,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- break;
- case GL_PROXY_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_PRECONVOLUTION];
- proxy = GL_TRUE;
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
@@ -323,24 +314,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
table = &(texUnit->ProxyColorTable);
proxy = GL_TRUE;
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCONVOLUTION];
- proxy = GL_TRUE;
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX];
- break;
- case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCOLORMATRIX];
- proxy = GL_TRUE;
- break;
default:
/* try texture targets */
{
@@ -459,11 +432,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
@@ -473,16 +441,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
scale = ctx->Pixel.TextureColorTableScale;
bias = ctx->Pixel.TextureColorTableBias;
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* try texture targets */
texObj = _mesa_select_tex_object(ctx, texUnit, target);
@@ -590,9 +548,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
@@ -600,12 +555,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
table = &(texUnit->ColorTable);
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* try texture targets */
{
@@ -714,22 +663,10 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
switch (target) {
- case GL_COLOR_TABLE_SGI:
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
scale = ctx->Pixel.TextureColorTableScale;
bias = ctx->Pixel.TextureColorTableBias;
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)");
return;
@@ -755,10 +692,7 @@ static void GLAPIENTRY
_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
{
GLfloat fparams[4];
- if (pname == GL_COLOR_TABLE_SGI ||
- pname == GL_TEXTURE_COLOR_TABLE_SGI ||
- pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||
- pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) {
+ if (pname == GL_TEXTURE_COLOR_TABLE_SGI) {
/* four values */
fparams[0] = (GLfloat) params[0];
fparams[1] = (GLfloat) params[1];
@@ -786,20 +720,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION]);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION]);
- return;
- }
- break;
- case GL_PROXY_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
@@ -822,34 +742,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
}
table = &(texUnit->ProxyColorTable);
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION]);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION]);
- return;
- }
- break;
- case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX]);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX]);
- return;
- }
- break;
- case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* try texture targets */
{
@@ -913,28 +805,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- GLfloat *scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- params[0] = (GLint) scale[0];
- params[1] = (GLint) scale[1];
- params[2] = (GLint) scale[2];
- params[3] = (GLint) scale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- GLfloat *bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- params[0] = (GLint) bias[0];
- params[1] = (GLint) bias[1];
- params[2] = (GLint) bias[2];
- params[3] = (GLint) bias[3];
- return;
- }
- break;
- case GL_PROXY_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
@@ -963,50 +833,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
}
table = &(texUnit->ProxyColorTable);
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- GLfloat *scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- params[0] = (GLint) scale[0];
- params[1] = (GLint) scale[1];
- params[2] = (GLint) scale[2];
- params[3] = (GLint) scale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- GLfloat *bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- params[0] = (GLint) bias[0];
- params[1] = (GLint) bias[1];
- params[2] = (GLint) bias[2];
- params[3] = (GLint) bias[3];
- return;
- }
- break;
- case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- GLfloat *scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- params[0] = (GLint) scale[0];
- params[0] = (GLint) scale[1];
- params[0] = (GLint) scale[2];
- params[0] = (GLint) scale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- GLfloat *bias = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- params[0] = (GLint) bias[0];
- params[1] = (GLint) bias[1];
- params[2] = (GLint) bias[2];
- params[3] = (GLint) bias[3];
- return;
- }
- break;
- case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* Try texture targets */
{
@@ -1103,31 +929,3 @@ _mesa_free_colortable_data( struct gl_color_table *p )
p->TableUB = NULL;
}
}
-
-
-/*
- * Initialize all colortables for a context.
- */
-void
-_mesa_init_colortables( GLcontext * ctx )
-{
- GLuint i;
- for (i = 0; i < COLORTABLE_MAX; i++) {
- _mesa_init_colortable(&ctx->ColorTable[i]);
- _mesa_init_colortable(&ctx->ProxyColorTable[i]);
- }
-}
-
-
-/*
- * Free all colortable data for a context
- */
-void
-_mesa_free_colortables_data( GLcontext *ctx )
-{
- GLuint i;
- for (i = 0; i < COLORTABLE_MAX; i++) {
- _mesa_free_colortable_data(&ctx->ColorTable[i]);
- _mesa_free_colortable_data(&ctx->ProxyColorTable[i]);
- }
-}