Another optional ARB_imaging subset extension.
GLboolean Blend;
GLbitfield ClipPlanes;
GLboolean ColorMaterial;
- GLboolean ColorTable[COLORTABLE_MAX];
GLboolean Convolution1D;
GLboolean Convolution2D;
GLboolean Separable2D;
attr->Blend = ctx->Color.BlendEnabled;
attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled;
attr->ColorMaterial = ctx->Light.ColorMaterialEnabled;
- for (i = 0; i < COLORTABLE_MAX; i++) {
- attr->ColorTable[i] = ctx->Pixel.ColorTableEnabled[i];
- }
attr->Convolution1D = ctx->Pixel.Convolution1DEnabled;
attr->Convolution2D = ctx->Pixel.Convolution2DEnabled;
attr->Separable2D = ctx->Pixel.Separable2DEnabled;
TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial,
GL_COLOR_MATERIAL);
- TEST_AND_UPDATE(ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION],
- enable->ColorTable[COLORTABLE_PRECONVOLUTION],
- GL_COLOR_TABLE);
- TEST_AND_UPDATE(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION],
- enable->ColorTable[COLORTABLE_POSTCONVOLUTION],
- GL_POST_CONVOLUTION_COLOR_TABLE);
- TEST_AND_UPDATE(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX],
- enable->ColorTable[COLORTABLE_POSTCOLORMATRIX],
- GL_POST_COLOR_MATRIX_COLOR_TABLE);
TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp,
GL_DEPTH_CLAMP);
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)");
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 */
{
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)");
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);
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)");
}
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 */
{
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;
_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];
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)");
}
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 */
{
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)");
}
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 */
{
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]);
- }
-}
extern void
_mesa_free_colortable_data( struct gl_color_table *table );
-extern void
-_mesa_init_colortables( GLcontext *ctx );
-
-extern void
-_mesa_free_colortables_data( GLcontext *ctx );
-
-
#endif /* COLORTAB_H */
_mesa_init_attrib( ctx );
_mesa_init_buffer_objects( ctx );
_mesa_init_color( ctx );
- _mesa_init_colortables( ctx );
_mesa_init_current( ctx );
_mesa_init_depth( ctx );
_mesa_init_debug( ctx );
_mesa_free_texture_data( ctx );
_mesa_free_matrix_data( ctx );
_mesa_free_viewport_data( ctx );
- _mesa_free_colortables_data( ctx );
_mesa_free_program_data(ctx);
_mesa_free_shader_state(ctx);
_mesa_free_queryobj_data(ctx);
client_state( ctx, cap, state );
return;
- /* GL_SGI_color_table */
- case GL_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table, cap);
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION] == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION] = state;
- break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table, cap);
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION] == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION] = state;
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table, cap);
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX] == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX] = state;
- break;
+ /* GL_SGI_texture_color_table */
case GL_TEXTURE_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_texture_color_table, cap);
if (ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled == state)
return (ctx->Array.ArrayObj->PointSize.Enabled != 0);
#endif
- /* GL_SGI_color_table */
- case GL_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table);
- return ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION];
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table);
- return ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION];
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table);
- return ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX];
-
/* GL_SGI_texture_color_table */
case GL_TEXTURE_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_texture_color_table);
{ OFF, "GL_NV_vertex_program1_1", F(NV_vertex_program1_1) },
{ ON, "GL_OES_read_format", F(OES_read_format) },
{ OFF, "GL_SGI_color_matrix", F(SGI_color_matrix) },
- { OFF, "GL_SGI_color_table", F(SGI_color_table) },
{ OFF, "GL_SGI_texture_color_table", F(SGI_texture_color_table) },
{ OFF, "GL_SGIS_generate_mipmap", F(SGIS_generate_mipmap) },
{ OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) },
ctx->Extensions.NV_fragment_program_option = GL_TRUE;
#endif
ctx->Extensions.SGI_color_matrix = GL_TRUE;
- ctx->Extensions.SGI_color_table = GL_TRUE;
ctx->Extensions.SGI_texture_color_table = GL_TRUE;
ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;
ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE;
ctx->Extensions.EXT_blend_subtract = GL_TRUE;
ctx->Extensions.EXT_convolution = GL_TRUE;
ctx->Extensions.SGI_color_matrix = GL_TRUE;
- ctx->Extensions.SGI_color_table = GL_TRUE;
}
EXTRA_EXT(EXT_stencil_two_side);
EXTRA_EXT(NV_light_max_exponent);
EXTRA_EXT(EXT_convolution);
-EXTRA_EXT(SGI_color_table);
EXTRA_EXT(SGI_texture_color_table);
EXTRA_EXT(EXT_depth_bounds_test);
EXTRA_EXT(ARB_depth_clamp);
CONTEXT_FLOAT(Pixel.PostConvolutionBias[3]),
extra_EXT_convolution },
- /* GL_SGI_color_table */
- { GL_COLOR_TABLE_SGI,
- CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]),
- extra_SGI_color_table },
- { GL_POST_CONVOLUTION_COLOR_TABLE_SGI,
- CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]),
- extra_SGI_color_table },
- { GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI,
- CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]),
- extra_SGI_color_table },
-
/* GL_SGI_texture_color_table */
{ GL_TEXTURE_COLOR_TABLE_SGI, LOC_TEXUNIT, TYPE_BOOLEAN,
offsetof(struct gl_texture_unit, ColorTableEnabled),
if (transferOps & IMAGE_MAP_COLOR_BIT) {
_mesa_map_rgba( ctx, n, rgba );
}
- /* GL_COLOR_TABLE lookup */
- if (transferOps & IMAGE_COLOR_TABLE_BIT) {
- _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_PRECONVOLUTION], n, rgba);
- }
/* convolution */
if (transferOps & IMAGE_CONVOLUTION_BIT) {
/* this has to be done in the calling code */
ctx->Pixel.PostConvolutionBias[BCOMP],
ctx->Pixel.PostConvolutionBias[ACOMP]);
}
- /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */
- if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) {
- _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_POSTCONVOLUTION], n, rgba);
- }
/* color matrix transform */
if (transferOps & IMAGE_COLOR_MATRIX_BIT) {
_mesa_transform_rgba(ctx, n, rgba);
}
- /* GL_POST_COLOR_MATRIX_COLOR_TABLE lookup */
- if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) {
- _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX], n, rgba);
- }
/* clamping to [0,1] */
if (transferOps & IMAGE_CLAMP_BIT) {
GLuint i;
GLboolean MapColorFlag;
GLboolean MapStencilFlag;
- /* There are multiple color table stages: */
- GLboolean ColorTableEnabled[COLORTABLE_MAX];
- GLfloat ColorTableScale[COLORTABLE_MAX][4]; /**< RGBA */
- GLfloat ColorTableBias[COLORTABLE_MAX][4]; /**< RGBA */
-
/* Convolution (GL_EXT_convolution) */
GLboolean Convolution1DEnabled;
GLboolean Convolution2DEnabled;
GLboolean NV_vertex_program1_1;
GLboolean OES_read_format;
GLboolean SGI_color_matrix;
- GLboolean SGI_color_table;
GLboolean SGI_texture_color_table;
GLboolean SGIS_generate_mipmap;
GLboolean SGIS_texture_edge_clamp;
#define IMAGE_SCALE_BIAS_BIT 0x1
#define IMAGE_SHIFT_OFFSET_BIT 0x2
#define IMAGE_MAP_COLOR_BIT 0x4
-#define IMAGE_COLOR_TABLE_BIT 0x8
#define IMAGE_CONVOLUTION_BIT 0x10
#define IMAGE_POST_CONVOLUTION_SCALE_BIAS 0x20
-#define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x40
#define IMAGE_COLOR_MATRIX_BIT 0x80
-#define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100
#define IMAGE_CLAMP_BIT 0x800
/** Pixel Transfer ops up to convolution */
#define IMAGE_PRE_CONVOLUTION_BITS (IMAGE_SCALE_BIAS_BIT | \
IMAGE_SHIFT_OFFSET_BIT | \
- IMAGE_MAP_COLOR_BIT | \
- IMAGE_COLOR_TABLE_BIT)
+ IMAGE_MAP_COLOR_BIT)
/** Pixel transfer ops after convolution */
#define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_SCALE_BIAS | \
- IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \
- IMAGE_COLOR_MATRIX_BIT | \
- IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT)
+ IMAGE_COLOR_MATRIX_BIT)
/*@}*/
struct gl_feedback Feedback; /**< Feedback */
struct gl_selection Select; /**< Selection */
- struct gl_color_table ColorTable[COLORTABLE_MAX];
- struct gl_color_table ProxyColorTable[COLORTABLE_MAX];
-
struct gl_program_state Program; /**< general program state */
struct gl_vertex_program_state VertexProgram;
struct gl_fragment_program_state FragmentProgram;
if (ctx->Pixel.MapColorFlag)
mask |= IMAGE_MAP_COLOR_BIT;
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION])
- mask |= IMAGE_COLOR_TABLE_BIT;
-
if (ctx->Pixel.Convolution1DEnabled ||
ctx->Pixel.Convolution2DEnabled ||
ctx->Pixel.Separable2DEnabled) {
}
}
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION])
- mask |= IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT;
-
if (ctx->ColorMatrixStack.Top->type != MATRIX_IDENTITY ||
ctx->Pixel.PostColorMatrixScale[0] != 1.0F ||
ctx->Pixel.PostColorMatrixBias[0] != 0.0F ||
ctx->Pixel.PostColorMatrixBias[3] != 0.0F)
mask |= IMAGE_COLOR_MATRIX_BIT;
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX])
- mask |= IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT;
-
ctx->_ImageTransferState = mask;
}
init_pixelmap(&ctx->PixelMaps.AtoA);
ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0);
ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0);
- for (i = 0; i < COLORTABLE_MAX; i++) {
- ASSIGN_4V(ctx->Pixel.ColorTableScale[i], 1.0, 1.0, 1.0, 1.0);
- ASSIGN_4V(ctx->Pixel.ColorTableBias[i], 0.0, 0.0, 0.0, 0.0);
- ctx->Pixel.ColorTableEnabled[i] = GL_FALSE;
- }
ctx->Pixel.Convolution1DEnabled = GL_FALSE;
ctx->Pixel.Convolution2DEnabled = GL_FALSE;
ctx->Pixel.Separable2DEnabled = GL_FALSE;