return;
}
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_ALPHA:
table->RedSize = 0;
table->GreenSize = 0;
_mesa_unpack_color_span_float(ctx,
count, /* number of pixels */
- table->Format, /* dest format */
+ table->_BaseFormat, /* dest format */
tempTab, /* dest address */
format, type, /* src format/type */
data, /* src data */
tableF = (GLfloat *) table->Table;
/* Apply scale & bias & clamp now */
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_INTENSITY:
for (i = 0; i < count; i++) {
GLuint j = start + i;
}
else {
/* non-float (GLchan) */
- const GLint comps = _mesa_components_in_format(table->Format);
+ const GLint comps = _mesa_components_in_format(table->_BaseFormat);
GLchan *dest = (GLchan *) table->Table + start * comps;
_mesa_unpack_color_span_chan(ctx, count, /* number of entries */
- table->Format, /* dest format */
+ table->_BaseFormat, /* dest format */
dest, /* dest address */
format, type, data, /* src data */
&ctx->Unpack,
}
baseFormat = base_colortab_format(internalFormat);
- if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ if (baseFormat < 0) {
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(internalFormat)");
return;
}
/* error */
if (proxy) {
table->Size = 0;
- table->IntFormat = (GLenum) 0;
- table->Format = (GLenum) 0;
+ table->InternalFormat = (GLenum) 0;
+ table->_BaseFormat = (GLenum) 0;
}
else {
_mesa_error(ctx, GL_INVALID_VALUE, "glColorTable(width=%d)", width);
if (width > (GLsizei) ctx->Const.MaxColorTableSize) {
if (proxy) {
table->Size = 0;
- table->IntFormat = (GLenum) 0;
- table->Format = (GLenum) 0;
+ table->InternalFormat = (GLenum) 0;
+ table->_BaseFormat = (GLenum) 0;
}
else {
_mesa_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
}
table->Size = width;
- table->IntFormat = internalFormat;
- table->Format = (GLenum) baseFormat;
+ table->InternalFormat = internalFormat;
+ table->_BaseFormat = (GLenum) baseFormat;
table->Type = (tableType == GL_FLOAT) ? GL_FLOAT : CHAN_TYPE;
- comps = _mesa_components_in_format(table->Format);
+ comps = _mesa_components_in_format(table->_BaseFormat);
assert(comps > 0); /* error should have been caught sooner */
if (!proxy) {
}
/* error should have been caught sooner */
- assert(_mesa_components_in_format(table->Format) > 0);
+ assert(_mesa_components_in_format(table->_BaseFormat) > 0);
if (start + count > (GLint) table->Size) {
_mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
ASSERT(table);
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_ALPHA:
if (table->Type == GL_FLOAT) {
const GLfloat *tableF = (const GLfloat *) table->Table;
switch (pname) {
case GL_COLOR_TABLE_FORMAT:
- *params = (GLfloat) table->IntFormat;
+ *params = (GLfloat) table->InternalFormat;
break;
case GL_COLOR_TABLE_WIDTH:
*params = (GLfloat) table->Size;
switch (pname) {
case GL_COLOR_TABLE_FORMAT:
- *params = table->IntFormat;
+ *params = table->InternalFormat;
break;
case GL_COLOR_TABLE_WIDTH:
*params = table->Size;
p->Type = CHAN_TYPE;
p->Table = NULL;
p->Size = 0;
- p->IntFormat = GL_RGBA;
+ p->InternalFormat = GL_RGBA;
}