summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/accum.c6
-rw-r--r--src/mesa/main/attrib.c5
-rw-r--r--src/mesa/main/blend.c31
-rw-r--r--src/mesa/main/blend.h9
-rw-r--r--src/mesa/main/bufferobj.c9
-rw-r--r--src/mesa/main/buffers.c47
-rw-r--r--src/mesa/main/buffers.h2
-rw-r--r--src/mesa/main/colortab.c330
-rw-r--r--src/mesa/main/colortab.h14
-rw-r--r--src/mesa/main/config.h8
-rw-r--r--src/mesa/main/context.c44
-rw-r--r--src/mesa/main/context.h8
-rw-r--r--src/mesa/main/convolve.c35
-rw-r--r--src/mesa/main/dd.h54
-rw-r--r--src/mesa/main/descrip.mms3
-rw-r--r--src/mesa/main/dlist.c22
-rw-r--r--src/mesa/main/enums.c5937
-rw-r--r--src/mesa/main/extensions.c5
-rw-r--r--src/mesa/main/fbobject.c33
-rw-r--r--src/mesa/main/framebuffer.c9
-rw-r--r--src/mesa/main/get.c39
-rw-r--r--src/mesa/main/getstring.c25
-rw-r--r--src/mesa/main/histogram.c4
-rw-r--r--src/mesa/main/image.c448
-rw-r--r--src/mesa/main/image.h42
-rw-r--r--src/mesa/main/imports.h13
-rw-r--r--src/mesa/main/light.c1
-rw-r--r--src/mesa/main/macros.h24
-rw-r--r--src/mesa/main/mipmap.c1147
-rw-r--r--src/mesa/main/mipmap.h52
-rw-r--r--src/mesa/main/mm.c2
-rw-r--r--src/mesa/main/mtypes.h88
-rw-r--r--src/mesa/main/pixel.c790
-rw-r--r--src/mesa/main/pixel.h42
-rw-r--r--src/mesa/main/rastpos.c1
-rw-r--r--src/mesa/main/state.c67
-rw-r--r--src/mesa/main/state.h6
-rw-r--r--src/mesa/main/stencil.c19
-rw-r--r--src/mesa/main/texcompress.c1
-rw-r--r--src/mesa/main/texcompress_fxt1.c1
-rw-r--r--src/mesa/main/texcompress_s3tc.c6
-rw-r--r--src/mesa/main/texenvprogram.c55
-rw-r--r--src/mesa/main/texformat_tmp.h119
-rw-r--r--src/mesa/main/teximage.c1088
-rw-r--r--src/mesa/main/teximage.h21
-rw-r--r--src/mesa/main/texobj.c39
-rw-r--r--src/mesa/main/texobj.h4
-rw-r--r--src/mesa/main/texstate.c125
-rw-r--r--src/mesa/main/texstore.c1742
-rw-r--r--src/mesa/main/texstore.h21
-rw-r--r--src/mesa/main/version.h6
51 files changed, 6618 insertions, 6031 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index a6e422640cf..2345695f3c6 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -94,11 +94,7 @@ _mesa_Accum( GLenum op, GLfloat value )
}
if (ctx->RenderMode == GL_RENDER) {
- GLint x = ctx->DrawBuffer->_Xmin;
- GLint y = ctx->DrawBuffer->_Ymin;
- GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
- GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
- ctx->Driver.Accum(ctx, op, value, x, y, width, height);
+ ctx->Driver.Accum(ctx, op, value);
}
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index ef970ad9eb6..e22edc1bbcf 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -337,6 +337,8 @@ _mesa_PushAttrib(GLbitfield mask)
if (mask & GL_TEXTURE_BIT) {
struct gl_texture_attrib *attr;
GLuint u;
+
+ _mesa_lock_context_textures(ctx);
/* Bump the texture object reference counts so that they don't
* inadvertantly get deleted.
*/
@@ -362,6 +364,9 @@ _mesa_PushAttrib(GLbitfield mask)
_mesa_copy_texture_object(&attr->Unit[u].SavedRect,
attr->Unit[u].CurrentRect);
}
+
+ _mesa_unlock_context_textures(ctx);
+
newnode = new_attrib_node( GL_TEXTURE_BIT );
newnode->data = attr;
newnode->next = head;
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index bf886af9e81..81bd4c2f320 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -516,6 +516,37 @@ _mesa_ColorMask( GLboolean red, GLboolean green,
}
+extern void GLAPIENTRY
+_mesa_ClampColorARB(GLenum target, GLenum clamp)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)");
+ return;
+ }
+
+ switch (target) {
+ case GL_CLAMP_VERTEX_COLOR_ARB:
+ ctx->Light.ClampVertexColor = clamp;
+ break;
+ case GL_CLAMP_FRAGMENT_COLOR_ARB:
+ ctx->Color.ClampFragmentColor = clamp;
+ break;
+ case GL_CLAMP_READ_COLOR_ARB:
+ ctx->Color.ClampReadColor = clamp;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(target)");
+ return;
+ }
+}
+
+
+
+
/**********************************************************************/
/** \name Initialization */
/*@{*/
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index d6c03d903f4..5c0f2783a73 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -72,6 +72,11 @@ extern void GLAPIENTRY
_mesa_ColorMask( GLboolean red, GLboolean green,
GLboolean blue, GLboolean alpha );
+
+extern void GLAPIENTRY
+_mesa_ClampColorARB(GLenum target, GLenum clamp);
+
+
extern void
_mesa_init_color( GLcontext * ctx );
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index adaf3ade078..3f9f7985465 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -296,7 +296,10 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
{
(void) ctx; (void) target;
- if (bufObj->Data && ((GLuint) (size + offset) <= bufObj->Size)) {
+ /* this should have been caught in _mesa_BufferSubData() */
+ ASSERT((GLuint) (size + offset) <= bufObj->Size);
+
+ if (bufObj->Data) {
_mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size );
}
}
@@ -336,9 +339,9 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
/**
* Fallback function called via ctx->Driver.MapBuffer().
* Hardware drivers that really implement buffer objects should never use
- * function.
+ * this function.
*
- * The input parameters will have been already tested for errors.
+ * The function parameters will have been already tested for errors.
*
* \param ctx GL context.
* \param target Buffer object target on which to operate.
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 6f4a51e1072..0e3ed155841 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,11 +1,6 @@
-/**
- * \file buffers.c
- * Frame buffer management.
- */
-
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -28,6 +23,13 @@
*/
+/**
+ * \file buffers.c
+ * General framebuffer-related functions, like glClear, glScissor, etc.
+ */
+
+
+
#include "glheader.h"
#include "buffers.h"
#include "colormac.h"
@@ -139,10 +141,6 @@ _mesa_Clear( GLbitfield mask )
}
if (ctx->RenderMode == GL_RENDER) {
- const GLint x = ctx->DrawBuffer->_Xmin;
- const GLint y = ctx->DrawBuffer->_Ymin;
- const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
- const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
GLbitfield bufferMask;
/* don't clear depth buffer if depth writing disabled */
@@ -175,8 +173,7 @@ _mesa_Clear( GLbitfield mask )
}
ASSERT(ctx->Driver.Clear);
- ctx->Driver.Clear( ctx, bufferMask, (GLboolean) !ctx->Scissor.Enabled,
- x, y, width, height );
+ ctx->Driver.Clear(ctx, bufferMask);
}
}
@@ -581,6 +578,9 @@ _mesa_ReadBuffer(GLenum buffer)
#if _HAVE_FULL_GL
/**
+ * XXX THIS IS OBSOLETE - drivers should take care of detecting window
+ * size changes and act accordingly, likely calling _mesa_resize_framebuffer().
+ *
* GL_MESA_resize_buffers extension.
*
* When this function is called, we'll ask the window system how large
@@ -591,16 +591,18 @@ _mesa_ReadBuffer(GLenum buffer)
* \note This function should only be called through the GL API, not
* from device drivers (as was done in the past).
*/
-void GLAPIENTRY
-_mesa_ResizeBuffersMESA( void )
-{
- GET_CURRENT_CONTEXT(ctx);
+void _mesa_resizebuffers( GLcontext *ctx )
+{
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glResizeBuffersMESA\n");
+ if (!ctx->Driver.GetBufferSize) {
+ return;
+ }
+
if (ctx->WinSysDrawBuffer) {
GLuint newWidth, newHeight;
GLframebuffer *buffer = ctx->WinSysDrawBuffer;
@@ -639,6 +641,19 @@ _mesa_ResizeBuffersMESA( void )
/*
+ * XXX THIS IS OBSOLETE
+ */
+void GLAPIENTRY
+_mesa_ResizeBuffersMESA( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->Extensions.MESA_resize_buffers)
+ _mesa_resizebuffers( ctx );
+}
+
+
+/*
* XXX move somewhere else someday?
*/
void GLAPIENTRY
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index b61bdad4330..fcc21523421 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -78,4 +78,6 @@ extern void
_mesa_set_scissor(GLcontext *ctx,
GLint x, GLint y, GLsizei width, GLsizei height);
+extern void _mesa_resizebuffers( GLcontext *ctx );
+
#endif
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 8b6fc127fe9..e9349516eb8 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -32,7 +32,7 @@
#include "state.h"
-/*
+/**
* Given an internalFormat token passed to glColorTable,
* return the corresponding base format.
* Return -1 if invalid token.
@@ -92,32 +92,14 @@ base_colortab_format( GLenum format )
-/*
+/**
* Examine table's format and set the component sizes accordingly.
*/
static void
set_component_sizes( struct gl_color_table *table )
{
- GLubyte sz;
-
- switch (table->Type) {
- case GL_UNSIGNED_BYTE:
- sz = 8 * sizeof(GLubyte);
- break;
- case GL_UNSIGNED_SHORT:
- sz = 8 * sizeof(GLushort);
- break;
- case GL_FLOAT:
- /* Don't actually return 32 here since that causes the conformance
- * tests to blow up. Conform thinks the component is an integer,
- * not a float.
- */
- sz = 8; /** 8 * sizeof(GLfloat); **/
- break;
- default:
- _mesa_problem(NULL, "bad color table type in set_component_sizes 0x%x", table->Type);
- return;
- }
+ /* assuming the ubyte table */
+ const GLubyte sz = 8;
switch (table->_BaseFormat) {
case GL_ALPHA:
@@ -217,7 +199,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
}
- if (table->Type == GL_FLOAT) {
+ {
/* convert user-provided data to GLfloat values */
GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
GLfloat *tableF;
@@ -233,7 +215,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
IMAGE_CLAMP_BIT); /* transfer ops */
/* the destination */
- tableF = (GLfloat *) table->Table;
+ tableF = table->TableF;
/* Apply scale & bias & clamp now */
switch (table->_BaseFormat) {
@@ -284,16 +266,16 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
return;
}
}
- else {
- /* non-float (GLchan) */
+
+ /* update the ubyte table */
+ {
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->_BaseFormat, /* dest format */
- dest, /* dest address */
- format, type, data, /* src data */
- &ctx->Unpack,
- 0); /* transfer ops */
+ const GLfloat *tableF = table->TableF + start * comps;
+ GLubyte *tableUB = table->TableUB + start * comps;
+ GLint i;
+ for (i = 0; i < count * comps; i++) {
+ CLAMPED_FLOAT_TO_UBYTE(tableUB[i], tableF[i]);
+ }
}
if (ctx->Unpack.BufferObj->Name) {
@@ -317,7 +299,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
GLint baseFormat;
GLfloat rScale = 1.0, gScale = 1.0, bScale = 1.0, aScale = 1.0;
GLfloat rBias = 0.0, gBias = 0.0, bBias = 0.0, aBias = 0.0;
- GLenum tableType = CHAN_TYPE;
GLint comps;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex */
@@ -367,11 +348,9 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
- tableType = GL_FLOAT;
break;
case GL_COLOR_TABLE:
table = &ctx->ColorTable;
- tableType = GL_FLOAT;
rScale = ctx->Pixel.ColorTableScale[0];
gScale = ctx->Pixel.ColorTableScale[1];
bScale = ctx->Pixel.ColorTableScale[2];
@@ -391,7 +370,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
return;
}
table = &(texUnit->ColorTable);
- tableType = GL_FLOAT;
rScale = ctx->Pixel.TextureColorTableScale[0];
gScale = ctx->Pixel.TextureColorTableScale[1];
bScale = ctx->Pixel.TextureColorTableScale[2];
@@ -407,12 +385,10 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
return;
}
table = &(texUnit->ProxyColorTable);
- tableType = GL_FLOAT;
proxy = GL_TRUE;
break;
case GL_POST_CONVOLUTION_COLOR_TABLE:
table = &ctx->PostConvolutionColorTable;
- tableType = GL_FLOAT;
rScale = ctx->Pixel.PCCTscale[0];
gScale = ctx->Pixel.PCCTscale[1];
bScale = ctx->Pixel.PCCTscale[2];
@@ -424,12 +400,10 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
break;
case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
table = &ctx->ProxyPostConvolutionColorTable;
- tableType = GL_FLOAT;
proxy = GL_TRUE;
break;
case GL_POST_COLOR_MATRIX_COLOR_TABLE:
table = &ctx->PostColorMatrixColorTable;
- tableType = GL_FLOAT;
rScale = ctx->Pixel.PCMCTscale[0];
gScale = ctx->Pixel.PCMCTscale[1];
bScale = ctx->Pixel.PCMCTscale[2];
@@ -441,7 +415,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
break;
case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
table = &ctx->ProxyPostColorMatrixColorTable;
- tableType = GL_FLOAT;
proxy = GL_TRUE;
break;
default:
@@ -491,27 +464,18 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
table->Size = width;
table->InternalFormat = internalFormat;
table->_BaseFormat = (GLenum) baseFormat;
- table->Type = (tableType == GL_FLOAT) ? GL_FLOAT : CHAN_TYPE;
comps = _mesa_components_in_format(table->_BaseFormat);
assert(comps > 0); /* error should have been caught sooner */
if (!proxy) {
- /* free old table, if any */
- if (table->Table) {
- FREE(table->Table);
- table->Table = NULL;
- }
+ _mesa_free_colortable_data(table);
if (width > 0) {
- if (table->Type == GL_FLOAT) {
- table->Table = MALLOC(comps * width * sizeof(GLfloat));
- }
- else {
- table->Table = MALLOC(comps * width * sizeof(GLchan));
- }
+ table->TableF = _mesa_malloc(comps * width * sizeof(GLfloat));
+ table->TableUB = _mesa_malloc(comps * width * sizeof(GLubyte));
- if (!table->Table) {
+ if (!table->TableF || !table->TableUB) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorTable");
return;
}
@@ -652,8 +616,8 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
return;
}
- if (!table->Table) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorSubTable");
+ if (!table->TableF || !table->TableUB) {
+ /* a GL_OUT_OF_MEMORY error would have been recorded previously */
return;
}
@@ -708,7 +672,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
GET_CURRENT_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
struct gl_color_table *table = NULL;
- GLchan rgba[MAX_COLOR_TABLE_SIZE][4];
+ GLfloat rgba[MAX_COLOR_TABLE_SIZE][4];
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (ctx->NewState) {
@@ -759,177 +723,67 @@ _mesa_GetColorTable( GLenum target, GLenum format,
ASSERT(table);
switch (table->_BaseFormat) {
- case GL_ALPHA:
- if (table->Type == GL_FLOAT) {
- const GLfloat *tableF = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] = 0;
- rgba[i][GCOMP] = 0;
- rgba[i][BCOMP] = 0;
-#if CHAN_BITS==32
- rgba[i][ACOMP] = tableF[i];
-#else
- rgba[i][ACOMP] = IROUND_POS(tableF[i] * CHAN_MAXF);
-#endif
- }
- }
- else {
- const GLchan *tableUB = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] = 0;
- rgba[i][GCOMP] = 0;
- rgba[i][BCOMP] = 0;
- rgba[i][ACOMP] = tableUB[i];
- }
- }
- break;
- case GL_LUMINANCE:
- if (table->Type == GL_FLOAT) {
- const GLfloat *tableF = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
-#if CHAN_BITS==32
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = tableF[i];
- rgba[i][ACOMP] = CHAN_MAX;
-#else
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF);
- rgba[i][ACOMP] = CHAN_MAX;
-#endif
- }
- }
- else {
- const GLchan *tableUB = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = tableUB[i];
- rgba[i][ACOMP] = CHAN_MAX;
- }
- }
- break;
- case GL_LUMINANCE_ALPHA:
- if (table->Type == GL_FLOAT) {
- const GLfloat *tableF = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
-#if CHAN_BITS==32
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = tableF[i*2+0];
- rgba[i][ACOMP] = tableF[i*2+1];
-#else
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = IROUND_POS(tableF[i*2+0] * CHAN_MAXF);
- rgba[i][ACOMP] = IROUND_POS(tableF[i*2+1] * CHAN_MAXF);
-#endif
- }
- }
- else {
- const GLchan *tableUB = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = tableUB[i*2+0];
- rgba[i][ACOMP] = tableUB[i*2+1];
- }
+ case GL_ALPHA:
+ {
+ GLuint i;
+ for (i = 0; i < table->Size; i++) {
+ rgba[i][RCOMP] = 0;
+ rgba[i][GCOMP] = 0;
+ rgba[i][BCOMP] = 0;
+ rgba[i][ACOMP] = table->TableF[i];
}
- break;
- case GL_INTENSITY:
- if (table->Type == GL_FLOAT) {
- const GLfloat *tableF = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
-#if CHAN_BITS==32
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = tableF[i];
-#else
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = IROUND_POS(tableF[i] * CHAN_MAXF);
-#endif
- }
- }
- else {
- const GLchan *tableUB = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = tableUB[i];
- }
- }
- break;
- case GL_RGB:
- if (table->Type == GL_FLOAT) {
- const GLfloat *tableF = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
-#if CHAN_BITS==32
- rgba[i][RCOMP] = tableF[i*3+0];
- rgba[i][GCOMP] = tableF[i*3+1];
- rgba[i][BCOMP] = tableF[i*3+2];
- rgba[i][ACOMP] = CHAN_MAX;
-#else
- rgba[i][RCOMP] = IROUND_POS(tableF[i*3+0] * CHAN_MAXF);
- rgba[i][GCOMP] = IROUND_POS(tableF[i*3+1] * CHAN_MAXF);
- rgba[i][BCOMP] = IROUND_POS(tableF[i*3+2] * CHAN_MAXF);
- rgba[i][ACOMP] = CHAN_MAX;
-#endif
- }
+ }
+ break;
+ case GL_LUMINANCE:
+ {
+ GLuint i;
+ for (i = 0; i < table->Size; i++) {
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = table->TableF[i];
+ rgba[i][ACOMP] = 1.0F;
}
- else {
- const GLchan *tableUB = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] = tableUB[i*3+0];
- rgba[i][GCOMP] = tableUB[i*3+1];
- rgba[i][BCOMP] = tableUB[i*3+2];
- rgba[i][ACOMP] = CHAN_MAX;
- }
+ }
+ break;
+ case GL_LUMINANCE_ALPHA:
+ {
+ GLuint i;
+ for (i = 0; i < table->Size; i++) {
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = table->TableF[i*2+0];
+ rgba[i][ACOMP] = table->TableF[i*2+1];
}
- break;
- case GL_RGBA:
- if (table->Type == GL_FLOAT) {
- const GLfloat *tableF = (const GLfloat *) table->Table;
-#if CHAN_BITS==32
- _mesa_memcpy(rgba, tableF, 4 * table->Size * sizeof(GLfloat));
-#else
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] = IROUND_POS(tableF[i*4+0] * CHAN_MAXF);
- rgba[i][GCOMP] = IROUND_POS(tableF[i*4+1] * CHAN_MAXF);
- rgba[i][BCOMP] = IROUND_POS(tableF[i*4+2] * CHAN_MAXF);
- rgba[i][ACOMP] = IROUND_POS(tableF[i*4+3] * CHAN_MAXF);
- }
-#endif
+ }
+ break;
+ case GL_INTENSITY:
+ {
+ GLuint i;
+ for (i = 0; i < table->Size; i++) {
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = table->TableF[i];
}
- else {
- const GLchan *tableUB = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < table->Size; i++) {
- rgba[i][RCOMP] = tableUB[i*4+0];
- rgba[i][GCOMP] = tableUB[i*4+1];
- rgba[i][BCOMP] = tableUB[i*4+2];
- rgba[i][ACOMP] = tableUB[i*4+3];
- }
+ }
+ break;
+ case GL_RGB:
+ {
+ GLuint i;
+ for (i = 0; i < table->Size; i++) {
+ rgba[i][RCOMP] = table->TableF[i*3+0];
+ rgba[i][GCOMP] = table->TableF[i*3+1];
+ rgba[i][BCOMP] = table->TableF[i*3+2];
+ rgba[i][ACOMP] = 1.0F;
}
- break;
- default:
- _mesa_problem(ctx, "bad table format in glGetColorTable");
- return;
+ }
+ break;
+ case GL_RGBA:
+ _mesa_memcpy(rgba, table->TableF, 4 * table->Size * sizeof(GLfloat));
+ break;
+ default:
+ _mesa_problem(ctx, "bad table format in glGetColorTable");
+ return;
}
if (ctx->Pack.BufferObj->Name) {
@@ -953,8 +807,8 @@ _mesa_GetColorTable( GLenum target, GLenum format,
data = ADD_POINTERS(buf, data);
}
- _mesa_pack_rgba_span_chan(ctx, table->Size, (const GLchan (*)[4]) rgba,
- format, type, data, &ctx->Pack, GL_FALSE);
+ _mesa_pack_rgba_span_float(ctx, table->Size, rgba,
+ format, type, data, &ctx->Pack, 0x0);
if (ctx->Pack.BufferObj->Name) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
@@ -1434,8 +1288,8 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
void
_mesa_init_colortable( struct gl_color_table *p )
{
- p->Type = CHAN_TYPE;
- p->Table = NULL;
+ p->TableF = NULL;
+ p->TableUB = NULL;
p->Size = 0;
p->InternalFormat = GL_RGBA;
}
@@ -1445,9 +1299,13 @@ _mesa_init_colortable( struct gl_color_table *p )
void
_mesa_free_colortable_data( struct gl_color_table *p )
{
- if (p->Table) {
- FREE(p->Table);
- p->Table = NULL;
+ if (p->TableF) {
+ _mesa_free(p->TableF);
+ p->TableF = NULL;
+ }
+ if (p->TableUB) {
+ _mesa_free(p->TableUB);
+ p->TableUB = NULL;
}
}
@@ -1455,7 +1313,8 @@ _mesa_free_colortable_data( struct gl_color_table *p )
/*
* Initialize all colortables for a context.
*/
-void _mesa_init_colortables( GLcontext * ctx )
+void
+_mesa_init_colortables( GLcontext * ctx )
{
/* Color tables */
_mesa_init_colortable(&ctx->ColorTable);
@@ -1470,7 +1329,8 @@ void _mesa_init_colortables( GLcontext * ctx )
/*
* Free all colortable data for a context
*/
-void _mesa_free_colortables_data( GLcontext *ctx )
+void
+_mesa_free_colortables_data( GLcontext *ctx )
{
_mesa_free_colortable_data(&ctx->ColorTable);
_mesa_free_colortable_data(&ctx->ProxyColorTable);
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index 4bd16210a0b..b6ff737a65f 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -1,18 +1,8 @@
-/**
- * \file colortab.h
- * Color tables.
- *
- * \if subset
- * (No-op)
- *
- * \endif
- */
-
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index e2ba65ac63b..5a0481328ff 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -5,7 +5,7 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -28,8 +28,8 @@
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#ifndef MESA_CONFIG_H_INCLUDED
+#define MESA_CONFIG_H_INCLUDED
/**
* \name OpenGL implementation limits
@@ -323,4 +323,4 @@
#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1)
-#endif /* CONFIG_H */
+#endif /* MESA_CONFIG_H_INCLUDED */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index afe6048c802..c8acc6b55ca 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -735,6 +735,10 @@ alloc_shared_state( GLcontext *ctx )
ss->DefaultCubeMap->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->DefaultRect->RefCount += MAX_TEXTURE_IMAGE_UNITS;
+ _glthread_INIT_MUTEX(ss->TexMutex);
+ ss->TextureStateStamp = 0;
+
+
#if FEATURE_EXT_framebuffer_object
ss->FrameBuffers = _mesa_NewHashTable();
if (!ss->FrameBuffers)
@@ -1048,6 +1052,7 @@ _mesa_init_constants( GLcontext *ctx )
ctx->Const.VertexProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS;
ctx->Const.VertexProgram.MaxEnvParams = MAX_NV_VERTEX_PROGRAM_PARAMS;
ctx->Const.VertexProgram.MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
+ ctx->Const.VertexProgram.MaxUniformComponents = MAX_VERTEX_UNIFORM_COMPONENTS;
init_natives(&ctx->Const.VertexProgram);
#endif
#if FEATURE_ARB_fragment_program
@@ -1061,6 +1066,7 @@ _mesa_init_constants( GLcontext *ctx )
ctx->Const.FragmentProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS;
ctx->Const.FragmentProgram.MaxEnvParams = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
ctx->Const.FragmentProgram.MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS;
+ ctx->Const.FragmentProgram.MaxUniformComponents = MAX_FRAGMENT_UNIFORM_COMPONENTS;
init_natives(&ctx->Const.FragmentProgram);
#endif
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
@@ -1087,6 +1093,11 @@ _mesa_init_constants( GLcontext *ctx )
ctx->Const.MaxRenderbufferSize = MAX_WIDTH;
#endif
+#if FEATURE_ARB_vertex_shader
+ ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.MaxVaryingFloats = MAX_VARYING_FLOATS;
+#endif
+
/* sanity checks */
ASSERT(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits,
ctx->Const.MaxTextureCoordUnits));
@@ -1629,11 +1640,12 @@ static void
initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
{
GLuint width, height;
- ASSERT(ctx->Driver.GetBufferSize);
- ctx->Driver.GetBufferSize(fb, &width, &height);
- if (ctx->Driver.ResizeBuffers)
- ctx->Driver.ResizeBuffers(ctx, fb, width, height);
- fb->Initialized = GL_TRUE;
+ if (ctx->Driver.GetBufferSize) {
+ ctx->Driver.GetBufferSize(fb, &width, &height);
+ if (ctx->Driver.ResizeBuffers)
+ ctx->Driver.ResizeBuffers(ctx, fb, width, height);
+ fb->Initialized = GL_TRUE;
+ }
}
@@ -1706,6 +1718,9 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
newCtx->NewState |= _NEW_BUFFERS;
+#if 1
+ /* We want to get rid of these lines: */
+
#if _HAVE_FULL_GL
if (!drawBuffer->Initialized) {
initialize_framebuffer_size(newCtx, drawBuffer);
@@ -1713,7 +1728,26 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
if (readBuffer != drawBuffer && !readBuffer->Initialized) {
initialize_framebuffer_size(newCtx, readBuffer);
}
+
+ _mesa_resizebuffers(newCtx);
+#endif
+
+#else
+ /* We want the drawBuffer and readBuffer to be initialized by
+ * the driver.
+ * This generally means the Width and Height match the actual
+ * window size and the renderbuffers (both hardware and software
+ * based) are allocated to match. The later can generally be
+ * done with a call to _mesa_resize_framebuffer().
+ *
+ * It's theoretically possible for a buffer to have zero width
+ * or height, but for now, assert check that the driver did what's
+ * expected of it.
+ */
+ ASSERT(drawBuffer->Width > 0);
+ ASSERT(drawBuffer->Height > 0);
#endif
+
if (newCtx->FirstTimeCurrent) {
/* set initial viewport and scissor size now */
_mesa_set_viewport(newCtx, 0, 0,
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index c72fe8a56ac..e7e0fda72ea 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -317,4 +317,12 @@ do { \
)
+/**
+ * Is RGBA LogicOp enabled?
+ */
+#define RGBA_LOGICOP_ENABLED(CTX) \
+ ((CTX)->Color.ColorLogicOpEnabled || \
+ ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP))
+
+
#endif /* CONTEXT_H */
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 6b97c7f56cd..814c6a0a5a6 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -560,9 +560,10 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi
void GLAPIENTRY
-_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
+_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
+ GLvoid *image)
{
- const struct gl_convolution_attrib *filter;
+ struct gl_convolution_attrib *filter;
GLuint row;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -623,10 +624,9 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *im
GLvoid *dst = _mesa_image_address2d(&ctx->Pack, image, filter->Width,
filter->Height, format, type,
row, 0);
- const GLfloat *src = filter->Filter + row * filter->Width * 4;
- _mesa_pack_rgba_span_float(ctx, filter->Width,
- (const GLfloat (*)[4]) src,
- format, type, dst, &ctx->Pack, 0);
+ GLfloat (*src)[4] = (GLfloat (*)[4]) (filter->Filter + row * filter->Width * 4);
+ _mesa_pack_rgba_span_float(ctx, filter->Width, src,
+ format, type, dst, &ctx->Pack, 0x0);
}
if (ctx->Pack.BufferObj->Name) {
@@ -768,10 +768,11 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
void GLAPIENTRY
-_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
+_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
+ GLvoid *row, GLvoid *column, GLvoid *span)
{
const GLint colStart = MAX_CONVOLUTION_WIDTH * 4;
- const struct gl_convolution_attrib *filter;
+ struct gl_convolution_attrib *filter;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -785,7 +786,8 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row,
}
if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)");
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetConvolutionFilter(format or type)");
return;
}
@@ -833,18 +835,17 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row,
GLvoid *dst = _mesa_image_address1d(&ctx->Pack, row, filter->Width,
format, type, 0);
_mesa_pack_rgba_span_float(ctx, filter->Width,
- (const GLfloat (*)[4]) filter->Filter,
- format, type, dst, &ctx->Pack, 0);
+ (GLfloat (*)[4]) filter->Filter,
+ format, type, dst, &ctx->Pack, 0x0);
}
/* Column filter */
if (column) {
GLvoid *dst = _mesa_image_address1d(&ctx->Pack, column, filter->Height,
format, type, 0);
- const GLfloat *src = filter->Filter + colStart;
- _mesa_pack_rgba_span_float(ctx, filter->Height,
- (const GLfloat (*)[4]) src,
- format, type, dst, &ctx->Pack, 0);
+ GLfloat (*src)[4] = (GLfloat (*)[4]) (filter->Filter + colStart);
+ _mesa_pack_rgba_span_float(ctx, filter->Height, src,
+ format, type, dst, &ctx->Pack, 0x0);
}
(void) span; /* unused at this time */
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 1b8cf6304e5..1de2542bee2 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -52,8 +52,7 @@ struct mesa_display_list;
struct dd_function_table {
/**
* Return a string as needed by glGetString().
- *
- * Only the GL_RENDERER token must be implemented. Otherwise, NULL can be
+ * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
* returned.
*/
const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
@@ -70,19 +69,20 @@ struct dd_function_table {
* Get the width and height of the named buffer/window.
*
* Mesa uses this to determine when the driver's window size has changed.
+ * XXX OBSOLETE: this function will be removed in the future.
*/
void (*GetBufferSize)( GLframebuffer *buffer,
GLuint *width, GLuint *height );
/**
* Resize the given framebuffer to the given size.
+ * XXX OBSOLETE: this function will be removed in the future.
*/
void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb,
GLuint width, GLuint height);
/**
* Called whenever an error is generated.
- *
* __GLcontextRec::ErrorValue contains the error value.
*/
void (*Error)( GLcontext *ctx );
@@ -99,40 +99,24 @@ struct dd_function_table {
/**
* Clear the color/depth/stencil/accum buffer(s).
- *
- * \param mask a bitmask of the DD_*_BIT values defined above that indicates
- * which buffers need to be cleared.
- * \param all if true then clear the whole buffer, else clear only the
- * region defined by <tt>(x, y, width, height)</tt>.
- *
- * This function must obey the glColorMask(), glIndexMask() and
- * glStencilMask() settings!
- * Software Mesa can do masked clears if the device driver can't.
+ * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
+ * renderbuffers need to be cleared.
*/
- void (*Clear)( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height );
+ void (*Clear)( GLcontext *ctx, GLbitfield buffers );
-
- /**
- * \name For hardware accumulation buffer
- */
- /*@{*/
/**
- * Execute glAccum command within the given scissor region.
+ * Execute glAccum command.
*/
- void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value,
- GLint xpos, GLint ypos, GLint width, GLint height );
- /*@}*/
+ void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
/**
- * \name glDraw(), glRead(), glCopyPixels() and glBitmap() functions
+ * \name Image-related functions
*/
/*@{*/
/**
- * This is called by glDrawPixels().
- *
+ * Called by glDrawPixels().
* \p unpack describes how to unpack the source image data.
*/
void (*DrawPixels)( GLcontext *ctx,
@@ -151,19 +135,14 @@ struct dd_function_table {
GLvoid *dest );
/**
- * Do a glCopyPixels().
- *
- * This function must respect all rasterization state, glPixelTransfer(),
- * glPixelZoom(), etc.
+ * Called by glCopyPixels().
*/
void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint dstx, GLint dsty, GLenum type );
/**
- * This is called by glBitmap().
- *
- * Works the same as dd_function_table::DrawPixels, above.
+ * Called by glBitmap().
*/
void (*Bitmap)( GLcontext *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
@@ -591,8 +570,9 @@ struct dd_function_table {
/** Notify driver that a program string has been specified. */
void (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
struct gl_program *prog);
-
-
+ /** Get value of a fragment program register during program execution. */
+ void (*GetFragmentProgramRegister)(GLcontext *ctx, enum register_file file,
+ GLuint index, GLfloat val[4]);
/** Query if program can be loaded onto hardware */
GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target,
diff --git a/src/mesa/main/descrip.mms b/src/mesa/main/descrip.mms
index 5790e6b796c..d09c57b3212 100644
--- a/src/mesa/main/descrip.mms
+++ b/src/mesa/main/descrip.mms
@@ -56,6 +56,7 @@ SOURCES =accum.c \
light.c \
lines.c \
matrix.c \
+ mipmap.c \
mm.c \
occlude.c \
pixel.c \
@@ -118,6 +119,7 @@ imports.obj,\
light.obj,\
lines.obj,\
matrix.obj,\
+mipmap.obj,\
mm.obj,\
occlude.obj,\
pixel.obj,\
@@ -193,6 +195,7 @@ imports.obj : imports.c vsnprintf.c
light.obj : light.c
lines.obj : lines.c
matrix.obj : matrix.c
+mipmap.obj : mipmap.c
mm.obj : mm.c
occlude.obj : occlude.c
pixel.obj : pixel.c
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 8be01cfb7dc..dca6ede6cb3 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -7869,7 +7869,6 @@ _mesa_init_dlist_table(struct _glapi_table *table)
/* GL 1.1 */
SET_AreTexturesResident(table, exec_AreTexturesResident);
- SET_AreTexturesResidentEXT(table, exec_AreTexturesResident);
SET_BindTexture(table, save_BindTexture);
SET_ColorPointer(table, exec_ColorPointer);
SET_CopyTexImage1D(table, save_CopyTexImage1D);
@@ -7881,12 +7880,10 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_EdgeFlagPointer(table, exec_EdgeFlagPointer);
SET_EnableClientState(table, exec_EnableClientState);
SET_GenTextures(table, exec_GenTextures);
- SET_GenTexturesEXT(table, exec_GenTextures);
SET_GetPointerv(table, exec_GetPointerv);
SET_IndexPointer(table, exec_IndexPointer);
SET_InterleavedArrays(table, exec_InterleavedArrays);
SET_IsTexture(table, exec_IsTexture);
- SET_IsTextureEXT(table, exec_IsTexture);
SET_NormalPointer(table, exec_NormalPointer);
SET_PopClientAttrib(table, exec_PopClientAttrib);
SET_PrioritizeTextures(table, save_PrioritizeTextures);
@@ -7925,31 +7922,18 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_CopyConvolutionFilter1D(table, exec_CopyConvolutionFilter1D);
SET_CopyConvolutionFilter2D(table, exec_CopyConvolutionFilter2D);
SET_GetColorTable(table, exec_GetColorTable);
- SET_GetColorTableSGI(table, exec_GetColorTable);
SET_GetColorTableParameterfv(table, exec_GetColorTableParameterfv);
- SET_GetColorTableParameterfvSGI(table, exec_GetColorTableParameterfv);
SET_GetColorTableParameteriv(table, exec_GetColorTableParameteriv);
- SET_GetColorTableParameterivSGI(table, exec_GetColorTableParameteriv);
SET_GetConvolutionFilter(table, exec_GetConvolutionFilter);
- SET_GetConvolutionFilterEXT(table, exec_GetConvolutionFilter);
SET_GetConvolutionParameterfv(table, exec_GetConvolutionParameterfv);
- SET_GetConvolutionParameterfvEXT(table, exec_GetConvolutionParameterfv);
SET_GetConvolutionParameteriv(table, exec_GetConvolutionParameteriv);
- SET_GetConvolutionParameterivEXT(table, exec_GetConvolutionParameteriv);
SET_GetHistogram(table, exec_GetHistogram);
- SET_GetHistogramEXT(table, exec_GetHistogram);
SET_GetHistogramParameterfv(table, exec_GetHistogramParameterfv);
- SET_GetHistogramParameterfvEXT(table, exec_GetHistogramParameterfv);
SET_GetHistogramParameteriv(table, exec_GetHistogramParameteriv);
- SET_GetHistogramParameterivEXT(table, exec_GetHistogramParameteriv);
SET_GetMinmax(table, exec_GetMinmax);
- SET_GetMinmaxEXT(table, exec_GetMinmax);
SET_GetMinmaxParameterfv(table, exec_GetMinmaxParameterfv);
- SET_GetMinmaxParameterfvEXT(table, exec_GetMinmaxParameterfv);
SET_GetMinmaxParameteriv(table, exec_GetMinmaxParameteriv);
- SET_GetMinmaxParameterivEXT(table, exec_GetMinmaxParameteriv);
SET_GetSeparableFilter(table, exec_GetSeparableFilter);
- SET_GetSeparableFilterEXT(table, exec_GetSeparableFilter);
SET_Histogram(table, save_Histogram);
SET_Minmax(table, save_Minmax);
SET_ResetHistogram(table, save_ResetHistogram);
@@ -7975,10 +7959,10 @@ _mesa_init_dlist_table(struct _glapi_table *table)
#if 0
SET_ColorTableSGI(table, save_ColorTable);
SET_ColorSubTableSGI(table, save_ColorSubTable);
-#endif
SET_GetColorTableSGI(table, exec_GetColorTable);
SET_GetColorTableParameterfvSGI(table, exec_GetColorTableParameterfv);
SET_GetColorTableParameterivSGI(table, exec_GetColorTableParameteriv);
+#endif
/* 30. GL_EXT_vertex_array */
SET_ColorPointerEXT(table, exec_ColorPointerEXT);
@@ -8068,7 +8052,7 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_GetVertexAttribfvNV(table, _mesa_GetVertexAttribfvNV);
SET_GetVertexAttribivNV(table, _mesa_GetVertexAttribivNV);
SET_GetVertexAttribPointervNV(table, _mesa_GetVertexAttribPointervNV);
- SET_IsProgramNV(table, _mesa_IsProgram);
+ SET_IsProgramNV(table, _mesa_IsProgramARB);
SET_LoadProgramNV(table, save_LoadProgramNV);
SET_ProgramParameter4dNV(table, save_ProgramParameter4dNV);
SET_ProgramParameter4dvNV(table, save_ProgramParameter4dvNV);
@@ -8161,7 +8145,7 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_BindProgramNV(table, save_BindProgramNV);
SET_DeleteProgramsNV(table, _mesa_DeletePrograms);
SET_GenProgramsNV(table, _mesa_GenPrograms);
- SET_IsProgramNV(table, _mesa_IsProgram);
+ SET_IsProgramNV(table, _mesa_IsProgramARB);
SET_GetVertexAttribdvNV(table, _mesa_GetVertexAttribdvNV);
SET_GetVertexAttribfvNV(table, _mesa_GetVertexAttribfvNV);
SET_GetVertexAttribivNV(table, _mesa_GetVertexAttribivNV);
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index b569d6ad6f6..d864cd22aa4 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -50,9 +50,13 @@ static const char enum_string_table[] =
"GL_ACCUM_CLEAR_VALUE\0"
"GL_ACCUM_GREEN_BITS\0"
"GL_ACCUM_RED_BITS\0"
+ "GL_ACTIVE_ATTRIBUTES\0"
+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
"GL_ACTIVE_STENCIL_FACE_EXT\0"
"GL_ACTIVE_TEXTURE\0"
"GL_ACTIVE_TEXTURE_ARB\0"
+ "GL_ACTIVE_UNIFORMS\0"
+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
"GL_ACTIVE_VERTEX_UNITS_ARB\0"
"GL_ADD\0"
"GL_ADD_SIGNED\0"
@@ -87,6 +91,7 @@ static const char enum_string_table[] =
"GL_ARRAY_BUFFER_ARB\0"
"GL_ARRAY_BUFFER_BINDING\0"
"GL_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_ATTACHED_SHADERS\0"
"GL_ATTRIB_ARRAY_POINTER_NV\0"
"GL_ATTRIB_ARRAY_SIZE_NV\0"
"GL_ATTRIB_ARRAY_STRIDE_NV\0"
@@ -112,6 +117,7 @@ static const char enum_string_table[] =
"GL_BLEND_DST_ALPHA\0"
"GL_BLEND_DST_RGB\0"
"GL_BLEND_EQUATION\0"
+ "GL_BLEND_EQUATION_ALPHA\0"
"GL_BLEND_EQUATION_ALPHA_EXT\0"
"GL_BLEND_EQUATION_EXT\0"
"GL_BLEND_EQUATION_RGB_EXT\0"
@@ -122,9 +128,13 @@ static const char enum_string_table[] =
"GL_BLUE_BIAS\0"
"GL_BLUE_BITS\0"
"GL_BLUE_SCALE\0"
+ "GL_BOOL\0"
"GL_BOOL_ARB\0"
+ "GL_BOOL_VEC2\0"
"GL_BOOL_VEC2_ARB\0"
+ "GL_BOOL_VEC3\0"
"GL_BOOL_VEC3_ARB\0"
+ "GL_BOOL_VEC4\0"
"GL_BOOL_VEC4_ARB\0"
"GL_BUFFER_ACCESS\0"
"GL_BUFFER_ACCESS_ARB\0"
@@ -245,6 +255,7 @@ static const char enum_string_table[] =
"GL_COMPARE_R_TO_TEXTURE_ARB\0"
"GL_COMPILE\0"
"GL_COMPILE_AND_EXECUTE\0"
+ "GL_COMPILE_STATUS\0"
"GL_COMPRESSED_ALPHA\0"
"GL_COMPRESSED_ALPHA_ARB\0"
"GL_COMPRESSED_INTENSITY\0"
@@ -289,6 +300,7 @@ static const char enum_string_table[] =
"GL_CONVOLUTION_HEIGHT_EXT\0"
"GL_CONVOLUTION_WIDTH\0"
"GL_CONVOLUTION_WIDTH_EXT\0"
+ "GL_COORD_REPLACE\0"
"GL_COORD_REPLACE_ARB\0"
"GL_COORD_REPLACE_NV\0"
"GL_COPY\0"
@@ -312,6 +324,7 @@ static const char enum_string_table[] =
"GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
"GL_CURRENT_NORMAL\0"
"GL_CURRENT_PALETTE_MATRIX_ARB\0"
+ "GL_CURRENT_PROGRAM\0"
"GL_CURRENT_QUERY\0"
"GL_CURRENT_QUERY_ARB\0"
"GL_CURRENT_RASTER_COLOR\0"
@@ -322,6 +335,7 @@ static const char enum_string_table[] =
"GL_CURRENT_RASTER_TEXTURE_COORDS\0"
"GL_CURRENT_SECONDARY_COLOR\0"
"GL_CURRENT_TEXTURE_COORDS\0"
+ "GL_CURRENT_VERTEX_ATTRIB\0"
"GL_CURRENT_VERTEX_ATTRIB_ARB\0"
"GL_CURRENT_WEIGHT_ARB\0"
"GL_CW\0"
@@ -332,6 +346,7 @@ static const char enum_string_table[] =
"GL_DECR\0"
"GL_DECR_WRAP\0"
"GL_DECR_WRAP_EXT\0"
+ "GL_DELETE_STATUS\0"
"GL_DEPTH\0"
"GL_DEPTH_ATTACHMENT_EXT\0"
"GL_DEPTH_BIAS\0"
@@ -374,36 +389,52 @@ static const char enum_string_table[] =
"GL_DOUBLE\0"
"GL_DOUBLEBUFFER\0"
"GL_DRAW_BUFFER\0"
+ "GL_DRAW_BUFFER0\0"
"GL_DRAW_BUFFER0_ARB\0"
"GL_DRAW_BUFFER0_ATI\0"
+ "GL_DRAW_BUFFER1\0"
+ "GL_DRAW_BUFFER10\0"
"GL_DRAW_BUFFER10_ARB\0"
"GL_DRAW_BUFFER10_ATI\0"
+ "GL_DRAW_BUFFER11\0"
"GL_DRAW_BUFFER11_ARB\0"
"GL_DRAW_BUFFER11_ATI\0"
+ "GL_DRAW_BUFFER12\0"
"GL_DRAW_BUFFER12_ARB\0"
"GL_DRAW_BUFFER12_ATI\0"
+ "GL_DRAW_BUFFER13\0"
"GL_DRAW_BUFFER13_ARB\0"
"GL_DRAW_BUFFER13_ATI\0"
+ "GL_DRAW_BUFFER14\0"
"GL_DRAW_BUFFER14_ARB\0"
"GL_DRAW_BUFFER14_ATI\0"
+ "GL_DRAW_BUFFER15\0"
"GL_DRAW_BUFFER15_ARB\0"
"GL_DRAW_BUFFER15_ATI\0"
"GL_DRAW_BUFFER1_ARB\0"
"GL_DRAW_BUFFER1_ATI\0"
+ "GL_DRAW_BUFFER2\0"
"GL_DRAW_BUFFER2_ARB\0"
"GL_DRAW_BUFFER2_ATI\0"
+ "GL_DRAW_BUFFER3\0"
"GL_DRAW_BUFFER3_ARB\0"
"GL_DRAW_BUFFER3_ATI\0"
+ "GL_DRAW_BUFFER4\0"
"GL_DRAW_BUFFER4_ARB\0"
"GL_DRAW_BUFFER4_ATI\0"
+ "GL_DRAW_BUFFER5\0"
"GL_DRAW_BUFFER5_ARB\0"
"GL_DRAW_BUFFER5_ATI\0"
+ "GL_DRAW_BUFFER6\0"
"GL_DRAW_BUFFER6_ARB\0"
"GL_DRAW_BUFFER6_ATI\0"
+ "GL_DRAW_BUFFER7\0"
"GL_DRAW_BUFFER7_ARB\0"
"GL_DRAW_BUFFER7_ATI\0"
+ "GL_DRAW_BUFFER8\0"
"GL_DRAW_BUFFER8_ARB\0"
"GL_DRAW_BUFFER8_ATI\0"
+ "GL_DRAW_BUFFER9\0"
"GL_DRAW_BUFFER9_ARB\0"
"GL_DRAW_BUFFER9_ATI\0"
"GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
@@ -448,11 +479,17 @@ static const char enum_string_table[] =
"GL_FILL\0"
"GL_FLAT\0"
"GL_FLOAT\0"
+ "GL_FLOAT_MAT2\0"
"GL_FLOAT_MAT2_ARB\0"
+ "GL_FLOAT_MAT3\0"
"GL_FLOAT_MAT3_ARB\0"
+ "GL_FLOAT_MAT4\0"
"GL_FLOAT_MAT4_ARB\0"
+ "GL_FLOAT_VEC2\0"
"GL_FLOAT_VEC2_ARB\0"
+ "GL_FLOAT_VEC3\0"
"GL_FLOAT_VEC3_ARB\0"
+ "GL_FLOAT_VEC4\0"
"GL_FLOAT_VEC4_ARB\0"
"GL_FOG\0"
"GL_FOG_BIT\0"
@@ -483,7 +520,9 @@ static const char enum_string_table[] =
"GL_FOG_START\0"
"GL_FRAGMENT_DEPTH\0"
"GL_FRAGMENT_PROGRAM_ARB\0"
+ "GL_FRAGMENT_SHADER\0"
"GL_FRAGMENT_SHADER_ARB\0"
+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
@@ -517,6 +556,30 @@ static const char enum_string_table[] =
"GL_GENERATE_MIPMAP_HINT_SGIS\0"
"GL_GENERATE_MIPMAP_SGIS\0"
"GL_GEQUAL\0"
+ "GL_GL_BLEND_EQUATION_RGB\0"
+ "GL_GL_COMPRESSED_SLUMINANCE\0"
+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
+ "GL_GL_COMPRESSED_SRGB\0"
+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
+ "GL_GL_FLOAT_MAT2x3\0"
+ "GL_GL_FLOAT_MAT2x4\0"
+ "GL_GL_FLOAT_MAT3x2\0"
+ "GL_GL_FLOAT_MAT3x4\0"
+ "GL_GL_FLOAT_MAT4x2\0"
+ "GL_GL_FLOAT_MAT4x3\0"
+ "GL_GL_PIXEL_PACK_BUFFER\0"
+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
+ "GL_GL_SLUMINANCE\0"
+ "GL_GL_SLUMINANCE8\0"
+ "GL_GL_SLUMINANCE8_ALPHA8\0"
+ "GL_GL_SLUMINANCE_ALPHA\0"
+ "GL_GL_SRGB\0"
+ "GL_GL_SRGB8\0"
+ "GL_GL_SRGB8_ALPHA8\0"
+ "GL_GL_SRGB_ALPHA\0"
"GL_GREATER\0"
"GL_GREEN\0"
"GL_GREEN_BIAS\0"
@@ -561,6 +624,7 @@ static const char enum_string_table[] =
"GL_INDEX_OFFSET\0"
"GL_INDEX_SHIFT\0"
"GL_INDEX_WRITEMASK\0"
+ "GL_INFO_LOG_LENGTH\0"
"GL_INT\0"
"GL_INTENSITY\0"
"GL_INTENSITY12\0"
@@ -575,8 +639,11 @@ static const char enum_string_table[] =
"GL_INTERPOLATE\0"
"GL_INTERPOLATE_ARB\0"
"GL_INTERPOLATE_EXT\0"
+ "GL_INT_VEC2\0"
"GL_INT_VEC2_ARB\0"
+ "GL_INT_VEC3\0"
"GL_INT_VEC3_ARB\0"
+ "GL_INT_VEC4\0"
"GL_INT_VEC4_ARB\0"
"GL_INVALID_ENUM\0"
"GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
@@ -625,6 +692,7 @@ static const char enum_string_table[] =
"GL_LINE_WIDTH\0"
"GL_LINE_WIDTH_GRANULARITY\0"
"GL_LINE_WIDTH_RANGE\0"
+ "GL_LINK_STATUS\0"
"GL_LIST_BASE\0"
"GL_LIST_BIT\0"
"GL_LIST_INDEX\0"
@@ -632,6 +700,7 @@ static const char enum_string_table[] =
"GL_LOAD\0"
"GL_LOGIC_OP\0"
"GL_LOGIC_OP_MODE\0"
+ "GL_LOWER_LEFT\0"
"GL_LUMINANCE\0"
"GL_LUMINANCE12\0"
"GL_LUMINANCE12_ALPHA12\0"
@@ -767,6 +836,7 @@ static const char enum_string_table[] =
"GL_MAX_COLOR_ATTACHMENTS_EXT\0"
"GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
"GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
"GL_MAX_CONVOLUTION_HEIGHT\0"
"GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
@@ -774,12 +844,14 @@ static const char enum_string_table[] =
"GL_MAX_CONVOLUTION_WIDTH_EXT\0"
"GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
"GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
+ "GL_MAX_DRAW_BUFFERS\0"
"GL_MAX_DRAW_BUFFERS_ARB\0"
"GL_MAX_DRAW_BUFFERS_ATI\0"
"GL_MAX_ELEMENTS_INDICES\0"
"GL_MAX_ELEMENTS_VERTICES\0"
"GL_MAX_EVAL_ORDER\0"
"GL_MAX_EXT\0"
+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
"GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
"GL_MAX_LIGHTS\0"
"GL_MAX_LIST_NESTING\0"
@@ -819,7 +891,9 @@ static const char enum_string_table[] =
"GL_MAX_RENDERBUFFER_SIZE_EXT\0"
"GL_MAX_SHININESS_NV\0"
"GL_MAX_SPOT_EXPONENT_NV\0"
+ "GL_MAX_TEXTURE_COORDS\0"
"GL_MAX_TEXTURE_COORDS_ARB\0"
+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
"GL_MAX_TEXTURE_LOD_BIAS\0"
"GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
@@ -829,9 +903,13 @@ static const char enum_string_table[] =
"GL_MAX_TEXTURE_UNITS_ARB\0"
"GL_MAX_TRACK_MATRICES_NV\0"
"GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
+ "GL_MAX_VARYING_FLOATS\0"
"GL_MAX_VARYING_FLOATS_ARB\0"
+ "GL_MAX_VERTEX_ATTRIBS\0"
"GL_MAX_VERTEX_ATTRIBS_ARB\0"
+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
"GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
"GL_MAX_VERTEX_UNITS_ARB\0"
"GL_MAX_VIEWPORT_DIMS\0"
@@ -1047,6 +1125,7 @@ static const char enum_string_table[] =
"GL_POINT_SIZE_RANGE\0"
"GL_POINT_SMOOTH\0"
"GL_POINT_SMOOTH_HINT\0"
+ "GL_POINT_SPRITE\0"
"GL_POINT_SPRITE_ARB\0"
"GL_POINT_SPRITE_COORD_ORIGIN\0"
"GL_POINT_SPRITE_NV\0"
@@ -1246,6 +1325,12 @@ static const char enum_string_table[] =
"GL_RGB_SCALE_EXT\0"
"GL_RIGHT\0"
"GL_S\0"
+ "GL_SAMPLER_1D\0"
+ "GL_SAMPLER_1D_SHADOW\0"
+ "GL_SAMPLER_2D\0"
+ "GL_SAMPLER_2D_SHADOW\0"
+ "GL_SAMPLER_3D\0"
+ "GL_SAMPLER_CUBE\0"
"GL_SAMPLES\0"
"GL_SAMPLES_3DFX\0"
"GL_SAMPLES_ARB\0"
@@ -1282,7 +1367,10 @@ static const char enum_string_table[] =
"GL_SEPARATE_SPECULAR_COLOR_EXT\0"
"GL_SET\0"
"GL_SHADER_OBJECT_ARB\0"
+ "GL_SHADER_SOURCE_LENGTH\0"
+ "GL_SHADER_TYPE\0"
"GL_SHADE_MODEL\0"
+ "GL_SHADING_LANGUAGE_VERSION\0"
"GL_SHADOW_AMBIENT_SGIX\0"
"GL_SHARED_TEXTURE_PALETTE_EXT\0"
"GL_SHININESS\0"
@@ -1339,6 +1427,13 @@ static const char enum_string_table[] =
"GL_STATIC_READ_ARB\0"
"GL_STENCIL\0"
"GL_STENCIL_ATTACHMENT_EXT\0"
+ "GL_STENCIL_BACK_FAIL\0"
+ "GL_STENCIL_BACK_FUNC\0"
+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
+ "GL_STENCIL_BACK_REF\0"
+ "GL_STENCIL_BACK_VALUE_MASK\0"
+ "GL_STENCIL_BACK_WRITEMASK\0"
"GL_STENCIL_BITS\0"
"GL_STENCIL_BUFFER_BIT\0"
"GL_STENCIL_CLEAR_VALUE\0"
@@ -1601,8 +1696,10 @@ static const char enum_string_table[] =
"GL_UNSIGNED_SHORT_8_8_MESA\0"
"GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
"GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
+ "GL_UPPER_LEFT\0"
"GL_V2F\0"
"GL_V3F\0"
+ "GL_VALIDATE_STATUS\0"
"GL_VENDOR\0"
"GL_VERSION\0"
"GL_VERTEX_ARRAY\0"
@@ -1631,20 +1728,29 @@ static const char enum_string_table[] =
"GL_VERTEX_ATTRIB_ARRAY9_NV\0"
"GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
"GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
"GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
"GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
"GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
"GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
"GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
"GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
"GL_VERTEX_BLEND_ARB\0"
"GL_VERTEX_PROGRAM_ARB\0"
"GL_VERTEX_PROGRAM_BINDING_NV\0"
"GL_VERTEX_PROGRAM_NV\0"
+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
"GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
"GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
"GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
"GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
+ "GL_VERTEX_SHADER\0"
"GL_VERTEX_SHADER_ARB\0"
"GL_VERTEX_STATE_PROGRAM_NV\0"
"GL_VIEWPORT\0"
@@ -1668,7 +1774,7 @@ static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1631] =
+static const enum_elt all_enums[1737] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -1685,2866 +1791,3009 @@ static const enum_elt all_enums[1631] =
{ 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
{ 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
{ 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
- { 224, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
- { 251, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
- { 269, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
- { 291, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- { 318, 0x00000104 }, /* GL_ADD */
- { 325, 0x00008574 }, /* GL_ADD_SIGNED */
- { 339, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
- { 357, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
- { 375, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
- { 403, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
- { 431, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
- { 450, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
- { 476, 0x00001906 }, /* GL_ALPHA */
- { 485, 0x0000803D }, /* GL_ALPHA12 */
- { 496, 0x0000803D }, /* GL_ALPHA12_EXT */
- { 511, 0x0000803E }, /* GL_ALPHA16 */
- { 522, 0x0000803E }, /* GL_ALPHA16_EXT */
- { 537, 0x0000803B }, /* GL_ALPHA4 */
- { 547, 0x0000803B }, /* GL_ALPHA4_EXT */
- { 561, 0x0000803C }, /* GL_ALPHA8 */
- { 571, 0x0000803C }, /* GL_ALPHA8_EXT */
- { 585, 0x00000D1D }, /* GL_ALPHA_BIAS */
- { 599, 0x00000D55 }, /* GL_ALPHA_BITS */
- { 613, 0x00000D1C }, /* GL_ALPHA_SCALE */
- { 628, 0x00000BC0 }, /* GL_ALPHA_TEST */
- { 642, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
- { 661, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
- { 679, 0x00000207 }, /* GL_ALWAYS */
- { 689, 0x00001200 }, /* GL_AMBIENT */
- { 700, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
- { 723, 0x00001501 }, /* GL_AND */
- { 730, 0x00001504 }, /* GL_AND_INVERTED */
- { 746, 0x00001502 }, /* GL_AND_REVERSE */
- { 761, 0x00008892 }, /* GL_ARRAY_BUFFER */
- { 777, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
- { 797, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
- { 821, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
- { 849, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
- { 876, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
- { 900, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
- { 926, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
- { 950, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
- { 972, 0x00000D80 }, /* GL_AUTO_NORMAL */
- { 987, 0x00000409 }, /* GL_AUX0 */
- { 995, 0x0000040A }, /* GL_AUX1 */
- { 1003, 0x0000040B }, /* GL_AUX2 */
- { 1011, 0x0000040C }, /* GL_AUX3 */
- { 1019, 0x00000C00 }, /* GL_AUX_BUFFERS */
- { 1034, 0x00000405 }, /* GL_BACK */
- { 1042, 0x00000402 }, /* GL_BACK_LEFT */
- { 1055, 0x00000403 }, /* GL_BACK_RIGHT */
- { 1069, 0x000080E0 }, /* GL_BGR */
- { 1076, 0x000080E1 }, /* GL_BGRA */
- { 1084, 0x00001A00 }, /* GL_BITMAP */
- { 1094, 0x00000704 }, /* GL_BITMAP_TOKEN */
- { 1110, 0x00000BE2 }, /* GL_BLEND */
- { 1119, 0x00008005 }, /* GL_BLEND_COLOR */
- { 1134, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
- { 1153, 0x00000BE0 }, /* GL_BLEND_DST */
- { 1166, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
- { 1185, 0x000080C8 }, /* GL_BLEND_DST_RGB */
- { 1202, 0x00008009 }, /* GL_BLEND_EQUATION */
- { 1220, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
- { 1248, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
- { 1270, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
- { 1296, 0x00000BE1 }, /* GL_BLEND_SRC */
- { 1309, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
- { 1328, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
- { 1345, 0x00001905 }, /* GL_BLUE */
- { 1353, 0x00000D1B }, /* GL_BLUE_BIAS */
- { 1366, 0x00000D54 }, /* GL_BLUE_BITS */
- { 1379, 0x00000D1A }, /* GL_BLUE_SCALE */
- { 1393, 0x00008B56 }, /* GL_BOOL_ARB */
- { 1405, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
- { 1422, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
- { 1439, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
- { 1456, 0x000088BB }, /* GL_BUFFER_ACCESS */
- { 1473, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
- { 1494, 0x000088BC }, /* GL_BUFFER_MAPPED */
- { 1511, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
- { 1532, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
- { 1554, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
- { 1580, 0x00008764 }, /* GL_BUFFER_SIZE */
- { 1595, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
- { 1614, 0x00008765 }, /* GL_BUFFER_USAGE */
- { 1630, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
- { 1650, 0x00001400 }, /* GL_BYTE */
- { 1658, 0x00002A24 }, /* GL_C3F_V3F */
- { 1669, 0x00002A26 }, /* GL_C4F_N3F_V3F */
- { 1684, 0x00002A22 }, /* GL_C4UB_V2F */
- { 1696, 0x00002A23 }, /* GL_C4UB_V3F */
- { 1708, 0x00000901 }, /* GL_CCW */
- { 1715, 0x00002900 }, /* GL_CLAMP */
- { 1724, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
- { 1743, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
- { 1766, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
- { 1790, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
- { 1807, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
- { 1829, 0x00001500 }, /* GL_CLEAR */
- { 1838, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
- { 1863, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
- { 1892, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
- { 1918, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- { 1947, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
- { 1973, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
- { 2000, 0x00003000 }, /* GL_CLIP_PLANE0 */
- { 2015, 0x00003001 }, /* GL_CLIP_PLANE1 */
- { 2030, 0x00003002 }, /* GL_CLIP_PLANE2 */
- { 2045, 0x00003003 }, /* GL_CLIP_PLANE3 */
- { 2060, 0x00003004 }, /* GL_CLIP_PLANE4 */
- { 2075, 0x00003005 }, /* GL_CLIP_PLANE5 */
- { 2090, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- { 2123, 0x00000A00 }, /* GL_COEFF */
- { 2132, 0x00001800 }, /* GL_COLOR */
- { 2141, 0x00008076 }, /* GL_COLOR_ARRAY */
- { 2156, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- { 2186, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 2220, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
- { 2243, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
- { 2263, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
- { 2285, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
- { 2305, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
- { 2330, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
- { 2356, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
- { 2382, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
- { 2408, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
- { 2434, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
- { 2460, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
- { 2486, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
- { 2511, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
- { 2536, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
- { 2561, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
- { 2586, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
- { 2611, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
- { 2636, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
- { 2661, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
- { 2686, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
- { 2711, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
- { 2731, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
- { 2752, 0x00001900 }, /* GL_COLOR_INDEX */
- { 2767, 0x00001603 }, /* GL_COLOR_INDEXES */
- { 2784, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
- { 2802, 0x00000B57 }, /* GL_COLOR_MATERIAL */
- { 2820, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
- { 2843, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
- { 2871, 0x000080B1 }, /* GL_COLOR_MATRIX */
- { 2887, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
- { 2907, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
- { 2935, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 2967, 0x00008458 }, /* GL_COLOR_SUM */
- { 2980, 0x00008458 }, /* GL_COLOR_SUM_ARB */
- { 2997, 0x000080D0 }, /* GL_COLOR_TABLE */
- { 3012, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
- { 3038, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
- { 3068, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
- { 3098, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
- { 3118, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
- { 3142, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
- { 3167, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
- { 3196, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
- { 3225, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
- { 3247, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
- { 3273, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
- { 3299, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
- { 3325, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
- { 3355, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
- { 3385, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- { 3415, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
- { 3449, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
- { 3483, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- { 3513, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
- { 3547, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
- { 3581, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
- { 3605, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
- { 3633, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
- { 3661, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
- { 3682, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
- { 3707, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
- { 3728, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
- { 3753, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
- { 3778, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
- { 3797, 0x00008570 }, /* GL_COMBINE */
- { 3808, 0x00008503 }, /* GL_COMBINE4 */
- { 3820, 0x00008572 }, /* GL_COMBINE_ALPHA */
- { 3837, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
- { 3858, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
- { 3879, 0x00008570 }, /* GL_COMBINE_ARB */
- { 3894, 0x00008570 }, /* GL_COMBINE_EXT */
- { 3909, 0x00008571 }, /* GL_COMBINE_RGB */
- { 3924, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
- { 3943, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
- { 3962, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
- { 3986, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
- { 4014, 0x00001300 }, /* GL_COMPILE */
- { 4025, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
- { 4048, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
- { 4068, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
- { 4092, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
- { 4116, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
- { 4144, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
- { 4168, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- { 4198, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
- { 4232, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
- { 4260, 0x000084ED }, /* GL_COMPRESSED_RGB */
- { 4278, 0x000084EE }, /* GL_COMPRESSED_RGBA */
- { 4297, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
- { 4320, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- { 4349, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- { 4382, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- { 4415, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- { 4448, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
- { 4470, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- { 4498, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- { 4530, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
- { 4560, 0x00008576 }, /* GL_CONSTANT */
- { 4572, 0x00008003 }, /* GL_CONSTANT_ALPHA */
- { 4590, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
- { 4612, 0x00008576 }, /* GL_CONSTANT_ARB */
- { 4628, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
- { 4652, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
- { 4674, 0x00008001 }, /* GL_CONSTANT_COLOR */
- { 4692, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
- { 4714, 0x00008576 }, /* GL_CONSTANT_EXT */
- { 4730, 0x00008010 }, /* GL_CONVOLUTION_1D */
- { 4748, 0x00008011 }, /* GL_CONVOLUTION_2D */
- { 4766, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
- { 4794, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
- { 4825, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
- { 4852, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
- { 4883, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
- { 4910, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
- { 4941, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
- { 4969, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
- { 5001, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
- { 5023, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
- { 5049, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
- { 5071, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
- { 5097, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
- { 5118, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
- { 5143, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
- { 5164, 0x00008862 }, /* GL_COORD_REPLACE_NV */
- { 5184, 0x00001503 }, /* GL_COPY */
- { 5192, 0x0000150C }, /* GL_COPY_INVERTED */
- { 5209, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
- { 5229, 0x00000B44 }, /* GL_CULL_FACE */
- { 5242, 0x00000B45 }, /* GL_CULL_FACE_MODE */
- { 5260, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
- { 5279, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- { 5311, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- { 5346, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
- { 5367, 0x00000001 }, /* GL_CURRENT_BIT */
- { 5382, 0x00000B00 }, /* GL_CURRENT_COLOR */
- { 5399, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
- { 5420, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
- { 5446, 0x00000B01 }, /* GL_CURRENT_INDEX */
- { 5463, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
- { 5485, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
- { 5513, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
- { 5534, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- { 5568, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
- { 5601, 0x00000B02 }, /* GL_CURRENT_NORMAL */
- { 5619, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- { 5649, 0x00008865 }, /* GL_CURRENT_QUERY */
- { 5666, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
- { 5687, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
- { 5711, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
- { 5738, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
- { 5762, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
- { 5789, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
- { 5822, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- { 5855, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
- { 5882, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
- { 5908, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
- { 5937, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
- { 5959, 0x00000900 }, /* GL_CW */
- { 5965, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
- { 5986, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
- { 6007, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
- { 6027, 0x00002101 }, /* GL_DECAL */
- { 6036, 0x00001E03 }, /* GL_DECR */
- { 6044, 0x00008508 }, /* GL_DECR_WRAP */
- { 6057, 0x00008508 }, /* GL_DECR_WRAP_EXT */
- { 6074, 0x00001801 }, /* GL_DEPTH */
- { 6083, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 6107, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 6121, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 6135, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 6155, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 6180, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 6200, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 6218, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 6239, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 6258, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 6279, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 6304, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 6330, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 6351, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 6376, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 6402, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 6423, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 6448, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 6474, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 6488, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 6503, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 6518, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 6538, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 6566, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 6594, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 6608, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 6630, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 6656, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 6675, 0x00001201 }, /* GL_DIFFUSE */
- { 6686, 0x00000BD0 }, /* GL_DITHER */
- { 6696, 0x00000A02 }, /* GL_DOMAIN */
- { 6706, 0x00001100 }, /* GL_DONT_CARE */
- { 6719, 0x000086AE }, /* GL_DOT3_RGB */
- { 6731, 0x000086AF }, /* GL_DOT3_RGBA */
- { 6744, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 6761, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 6778, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 6794, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 6810, 0x0000140A }, /* GL_DOUBLE */
- { 6820, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 6836, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 6851, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 6871, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 6891, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 6912, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 6933, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 6954, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 6975, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 6996, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 7017, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 7038, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 7059, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 7080, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 7101, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 7122, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 7143, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 7163, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 7183, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 7203, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 7223, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 7243, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 7263, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 7283, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 7303, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 7323, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 7343, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 7363, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 7383, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 7403, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 7423, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 7443, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 7463, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 7483, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 7503, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 7535, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 7559, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 7579, 0x00000304 }, /* GL_DST_ALPHA */
- { 7592, 0x00000306 }, /* GL_DST_COLOR */
- { 7605, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 7621, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 7641, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 7657, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 7677, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 7693, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 7713, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 7726, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 7745, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 7779, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 7817, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 7844, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 7870, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 7894, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
- { 7922, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 7954, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 7990, 0x00001600 }, /* GL_EMISSION */
- { 8002, 0x00002000 }, /* GL_ENABLE_BIT */
- { 8016, 0x00000202 }, /* GL_EQUAL */
- { 8025, 0x00001509 }, /* GL_EQUIV */
- { 8034, 0x00010000 }, /* GL_EVAL_BIT */
- { 8046, 0x00000800 }, /* GL_EXP */
- { 8053, 0x00000801 }, /* GL_EXP2 */
- { 8061, 0x00001F03 }, /* GL_EXTENSIONS */
- { 8075, 0x00002400 }, /* GL_EYE_LINEAR */
- { 8089, 0x00002502 }, /* GL_EYE_PLANE */
- { 8102, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 8127, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 8144, 0x00000000 }, /* GL_FALSE */
- { 8153, 0x00001101 }, /* GL_FASTEST */
- { 8164, 0x00001C01 }, /* GL_FEEDBACK */
- { 8176, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 8203, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 8227, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 8251, 0x00001B02 }, /* GL_FILL */
- { 8259, 0x00001D00 }, /* GL_FLAT */
- { 8267, 0x00001406 }, /* GL_FLOAT */
- { 8276, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 8294, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 8312, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 8330, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 8348, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 8366, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 8384, 0x00000B60 }, /* GL_FOG */
- { 8391, 0x00000080 }, /* GL_FOG_BIT */
- { 8402, 0x00000B66 }, /* GL_FOG_COLOR */
- { 8415, 0x00008451 }, /* GL_FOG_COORD */
- { 8428, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 8446, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 8470, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 8509, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 8552, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 8584, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 8615, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 8644, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 8669, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 8688, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 8722, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 8749, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 8775, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 8799, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 8816, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 8831, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 8855, 0x00000B64 }, /* GL_FOG_END */
- { 8866, 0x00000C54 }, /* GL_FOG_HINT */
- { 8878, 0x00000B61 }, /* GL_FOG_INDEX */
- { 8891, 0x00000B65 }, /* GL_FOG_MODE */
- { 8903, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 8922, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 8947, 0x00000B63 }, /* GL_FOG_START */
- { 8960, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 8978, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 9002, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 9025, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 9067, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 9109, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 9158, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 9210, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 9254, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 9281, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 9309, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 9328, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 9369, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 9410, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 9452, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 9503, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 9541, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 9590, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 9632, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 9664, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 9695, 0x00000404 }, /* GL_FRONT */
- { 9704, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 9722, 0x00000B46 }, /* GL_FRONT_FACE */
- { 9736, 0x00000400 }, /* GL_FRONT_LEFT */
- { 9750, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 9765, 0x00008006 }, /* GL_FUNC_ADD */
- { 9777, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 9793, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 9818, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 9847, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 9864, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 9885, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 9904, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 9928, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 9957, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 9981, 0x00000206 }, /* GL_GEQUAL */
- { 9991, 0x00000204 }, /* GL_GREATER */
- { 10002, 0x00001904 }, /* GL_GREEN */
- { 10011, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 10025, 0x00000D53 }, /* GL_GREEN_BITS */
- { 10039, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 10054, 0x00008000 }, /* GL_HINT_BIT */
- { 10066, 0x00008024 }, /* GL_HISTOGRAM */
- { 10079, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 10103, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 10131, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 10154, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 10181, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 10198, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 10218, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 10242, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 10266, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 10294, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 10322, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 10354, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 10376, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 10402, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 10420, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 10442, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 10461, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 10484, 0x0000862A }, /* GL_IDENTITY_NV */
- { 10499, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 10519, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 10559, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 10597, 0x00001E02 }, /* GL_INCR */
- { 10605, 0x00008507 }, /* GL_INCR_WRAP */
- { 10618, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 10635, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 10650, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 10680, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 10714, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 10737, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 10759, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 10779, 0x00000D51 }, /* GL_INDEX_BITS */
- { 10793, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 10814, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 10832, 0x00000C30 }, /* GL_INDEX_MODE */
- { 10846, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 10862, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 10877, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 10896, 0x00001404 }, /* GL_INT */
- { 10903, 0x00008049 }, /* GL_INTENSITY */
- { 10916, 0x0000804C }, /* GL_INTENSITY12 */
- { 10931, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 10950, 0x0000804D }, /* GL_INTENSITY16 */
- { 10965, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 10984, 0x0000804A }, /* GL_INTENSITY4 */
- { 10998, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 11016, 0x0000804B }, /* GL_INTENSITY8 */
- { 11030, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 11048, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 11065, 0x00008575 }, /* GL_INTERPOLATE */
- { 11080, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 11099, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 11118, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 11134, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 11150, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 11166, 0x00000500 }, /* GL_INVALID_ENUM */
- { 11182, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 11219, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 11240, 0x00000501 }, /* GL_INVALID_VALUE */
- { 11257, 0x0000862B }, /* GL_INVERSE_NV */
- { 11271, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 11295, 0x0000150A }, /* GL_INVERT */
- { 11305, 0x00001E00 }, /* GL_KEEP */
- { 11313, 0x00000406 }, /* GL_LEFT */
- { 11321, 0x00000203 }, /* GL_LEQUAL */
- { 11331, 0x00000201 }, /* GL_LESS */
- { 11339, 0x00004000 }, /* GL_LIGHT0 */
- { 11349, 0x00004001 }, /* GL_LIGHT1 */
- { 11359, 0x00004002 }, /* GL_LIGHT2 */
- { 11369, 0x00004003 }, /* GL_LIGHT3 */
- { 11379, 0x00004004 }, /* GL_LIGHT4 */
- { 11389, 0x00004005 }, /* GL_LIGHT5 */
- { 11399, 0x00004006 }, /* GL_LIGHT6 */
- { 11409, 0x00004007 }, /* GL_LIGHT7 */
- { 11419, 0x00000B50 }, /* GL_LIGHTING */
- { 11431, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 11447, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 11470, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 11499, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 11532, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 11560, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 11584, 0x00001B01 }, /* GL_LINE */
- { 11592, 0x00002601 }, /* GL_LINEAR */
- { 11602, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 11624, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 11654, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 11685, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 11709, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 11734, 0x00000001 }, /* GL_LINES */
- { 11743, 0x00000004 }, /* GL_LINE_BIT */
- { 11755, 0x00000002 }, /* GL_LINE_LOOP */
- { 11768, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 11788, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 11803, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 11823, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 11839, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 11863, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 11886, 0x00000003 }, /* GL_LINE_STRIP */
- { 11900, 0x00000702 }, /* GL_LINE_TOKEN */
- { 11914, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 11928, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 11954, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 11974, 0x00000B32 }, /* GL_LIST_BASE */
- { 11987, 0x00020000 }, /* GL_LIST_BIT */
- { 11999, 0x00000B33 }, /* GL_LIST_INDEX */
- { 12013, 0x00000B30 }, /* GL_LIST_MODE */
- { 12026, 0x00000101 }, /* GL_LOAD */
- { 12034, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 12046, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 12063, 0x00001909 }, /* GL_LUMINANCE */
- { 12076, 0x00008041 }, /* GL_LUMINANCE12 */
- { 12091, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 12114, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 12141, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 12163, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 12189, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 12208, 0x00008042 }, /* GL_LUMINANCE16 */
- { 12223, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 12246, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 12273, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 12292, 0x0000803F }, /* GL_LUMINANCE4 */
- { 12306, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 12327, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 12352, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 12370, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 12391, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 12416, 0x00008040 }, /* GL_LUMINANCE8 */
- { 12430, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 12451, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 12476, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 12494, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 12513, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 12529, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 12549, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 12571, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 12585, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 12600, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 12624, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 12648, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 12672, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 12696, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 12713, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 12730, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 12758, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 12787, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 12816, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 12845, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 12874, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 12903, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 12932, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 12960, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 12988, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 13016, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 13044, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 13072, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 13100, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 13128, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 13156, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 13184, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 13200, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 13220, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 13242, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 13256, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 13271, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 13295, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 13319, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 13343, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 13367, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 13384, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 13401, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 13429, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 13458, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 13487, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 13516, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 13545, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 13574, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 13603, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 13631, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 13659, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 13687, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 13715, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 13743, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 13771, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 13799, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 13827, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 13855, 0x00000D10 }, /* GL_MAP_COLOR */
- { 13868, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 13883, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 13898, 0x00008630 }, /* GL_MATRIX0_NV */
- { 13912, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 13928, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 13944, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 13960, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 13976, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 13992, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 14008, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 14024, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 14040, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 14056, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 14072, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 14087, 0x00008631 }, /* GL_MATRIX1_NV */
- { 14101, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 14117, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 14133, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 14149, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 14165, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 14181, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 14197, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 14213, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 14229, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 14245, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 14261, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 14276, 0x00008632 }, /* GL_MATRIX2_NV */
- { 14290, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 14306, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 14322, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 14337, 0x00008633 }, /* GL_MATRIX3_NV */
- { 14351, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 14366, 0x00008634 }, /* GL_MATRIX4_NV */
- { 14380, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 14395, 0x00008635 }, /* GL_MATRIX5_NV */
- { 14409, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 14424, 0x00008636 }, /* GL_MATRIX6_NV */
- { 14438, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 14453, 0x00008637 }, /* GL_MATRIX7_NV */
- { 14467, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 14482, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 14497, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 14523, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 14557, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 14588, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 14621, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 14652, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 14667, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 14689, 0x00008008 }, /* GL_MAX */
- { 14696, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 14719, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 14745, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 14778, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 14804, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 14838, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 14857, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 14886, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 14918, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 14954, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 14994, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 15020, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 15050, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 15075, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 15104, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 15133, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 15166, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 15190, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 15214, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 15238, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 15263, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 15281, 0x00008008 }, /* GL_MAX_EXT */
- { 15292, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 15331, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 15345, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 15365, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 15403, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 15432, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 15456, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 15484, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 15507, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 15544, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 15580, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 15607, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 15636, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 15670, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 15706, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 15733, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 15765, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 15801, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 15830, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 15859, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 15887, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 15925, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 15969, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 16012, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 16046, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 16085, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 16122, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 16160, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 16203, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 16246, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 16276, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 16307, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 16343, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 16379, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 16409, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 16443, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 16476, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 16505, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 16525, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 16549, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 16575, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 16606, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 16630, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 16664, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 16684, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 16711, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 16732, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 16757, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 16782, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 16817, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 16843, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 16869, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 16907, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 16944, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 16968, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 16989, 0x00008007 }, /* GL_MIN */
- { 16996, 0x0000802E }, /* GL_MINMAX */
- { 17006, 0x0000802E }, /* GL_MINMAX_EXT */
- { 17020, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 17037, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 17058, 0x00008030 }, /* GL_MINMAX_SINK */
- { 17073, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 17092, 0x00008007 }, /* GL_MIN_EXT */
- { 17103, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 17122, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 17145, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 17168, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 17188, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 17208, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 17238, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 17266, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 17294, 0x00001700 }, /* GL_MODELVIEW */
- { 17307, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 17325, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 17344, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 17363, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 17382, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 17401, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 17420, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 17439, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 17458, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 17477, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 17496, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 17515, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 17533, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 17552, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 17571, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 17590, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 17609, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 17628, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 17647, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 17666, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 17685, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 17704, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 17723, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 17741, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 17760, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 17779, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 17797, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 17815, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 17833, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 17851, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 17869, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 17887, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 17905, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 17925, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 17952, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 17977, 0x00002100 }, /* GL_MODULATE */
- { 17989, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 18009, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 18036, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 18061, 0x00000103 }, /* GL_MULT */
- { 18069, 0x0000809D }, /* GL_MULTISAMPLE */
- { 18084, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 18104, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 18123, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 18142, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 18166, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 18189, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 18219, 0x00002A25 }, /* GL_N3F_V3F */
- { 18230, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 18250, 0x0000150E }, /* GL_NAND */
- { 18258, 0x00002600 }, /* GL_NEAREST */
- { 18269, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 18300, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 18332, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 18357, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 18383, 0x00000200 }, /* GL_NEVER */
- { 18392, 0x00001102 }, /* GL_NICEST */
- { 18402, 0x00000000 }, /* GL_NONE */
- { 18410, 0x00001505 }, /* GL_NOOP */
- { 18418, 0x00001508 }, /* GL_NOR */
- { 18425, 0x00000BA1 }, /* GL_NORMALIZE */
- { 18438, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 18454, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 18485, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 18520, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 18544, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 18567, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 18588, 0x00008511 }, /* GL_NORMAL_MAP */
- { 18602, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 18620, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 18637, 0x00000205 }, /* GL_NOTEQUAL */
- { 18649, 0x00000000 }, /* GL_NO_ERROR */
- { 18661, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 18695, 0x000086A2 }, /* GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 18733, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 18765, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 18807, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 18837, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 18877, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 18908, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 18937, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 18965, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 18995, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 19012, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 19038, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 19054, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 19089, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 19111, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 19130, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 19160, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 19181, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 19209, 0x00000001 }, /* GL_ONE */
- { 19216, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 19244, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 19276, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 19304, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 19336, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 19359, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 19382, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 19405, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 19428, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 19446, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 19468, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 19490, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 19506, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 19526, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 19546, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 19564, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 19586, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 19608, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 19624, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 19644, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 19664, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 19682, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 19704, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 19726, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 19742, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 19762, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 19782, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 19803, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 19822, 0x00001507 }, /* GL_OR */
- { 19828, 0x00000A01 }, /* GL_ORDER */
- { 19837, 0x0000150D }, /* GL_OR_INVERTED */
- { 19852, 0x0000150B }, /* GL_OR_REVERSE */
- { 19866, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 19883, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 19901, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 19922, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 19942, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 19960, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 19979, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 19999, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 20019, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 20037, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 20056, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 20081, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 20105, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 20126, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 20148, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 20170, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 20195, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 20219, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 20240, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 20262, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 20284, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 20306, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 20337, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 20357, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 20382, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 20402, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 20427, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 20447, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 20472, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 20492, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 20517, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 20537, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 20562, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 20582, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 20607, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 20627, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 20652, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 20672, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 20697, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 20717, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 20742, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 20762, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 20787, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 20805, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 20838, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 20863, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 20898, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 20925, 0x00001B00 }, /* GL_POINT */
- { 20934, 0x00000000 }, /* GL_POINTS */
- { 20944, 0x00000002 }, /* GL_POINT_BIT */
- { 20957, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 20987, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 21021, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 21055, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 21090, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 21119, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 21152, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 21185, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 21219, 0x00000B11 }, /* GL_POINT_SIZE */
- { 21233, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 21259, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 21277, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 21299, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 21321, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 21344, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 21362, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 21384, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 21406, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 21429, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 21449, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 21465, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 21486, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 21506, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 21535, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 21554, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 21580, 0x00000701 }, /* GL_POINT_TOKEN */
- { 21595, 0x00000009 }, /* GL_POLYGON */
- { 21606, 0x00000008 }, /* GL_POLYGON_BIT */
- { 21621, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 21637, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 21660, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 21685, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 21708, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 21731, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 21755, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 21779, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 21797, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 21820, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 21839, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 21862, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 21879, 0x00001203 }, /* GL_POSITION */
- { 21891, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 21923, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 21959, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 21992, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 22029, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 22060, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 22095, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 22127, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 22163, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 22196, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 22228, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 22264, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 22297, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 22334, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 22364, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 22398, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 22429, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 22464, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 22495, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 22530, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 22562, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 22598, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 22628, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 22662, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 22693, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 22728, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 22760, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 22791, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 22826, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 22858, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 22894, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 22923, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 22956, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 22986, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 23020, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 23059, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 23092, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 23132, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 23166, 0x00008578 }, /* GL_PREVIOUS */
- { 23178, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 23194, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 23210, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 23227, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 23248, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 23269, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 23302, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 23334, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 23357, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 23380, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 23410, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 23439, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 23467, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 23489, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 23517, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 23545, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 23567, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 23588, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 23628, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 23667, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 23697, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 23732, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 23765, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 23799, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 23838, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 23877, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 23899, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 23925, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 23949, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 23972, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 23994, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 24015, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 24036, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 24063, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 24095, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 24127, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 24162, 0x00001701 }, /* GL_PROJECTION */
- { 24176, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 24197, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 24223, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 24244, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 24263, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 24286, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 24325, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 24363, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 24383, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 24407, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 24427, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 24451, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 24471, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 24504, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 24530, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 24560, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 24591, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 24621, 0x00002003 }, /* GL_Q */
- { 24626, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 24651, 0x00000007 }, /* GL_QUADS */
- { 24660, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 24677, 0x00000008 }, /* GL_QUAD_STRIP */
- { 24691, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 24713, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 24739, 0x00008866 }, /* GL_QUERY_RESULT */
- { 24755, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 24775, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 24801, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 24831, 0x00002002 }, /* GL_R */
- { 24836, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 24848, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 24881, 0x00000C02 }, /* GL_READ_BUFFER */
- { 24896, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 24928, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 24952, 0x000088B8 }, /* GL_READ_ONLY */
- { 24965, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 24982, 0x000088BA }, /* GL_READ_WRITE */
- { 24996, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 25014, 0x00001903 }, /* GL_RED */
- { 25021, 0x00008016 }, /* GL_REDUCE */
- { 25031, 0x00008016 }, /* GL_REDUCE_EXT */
- { 25045, 0x00000D15 }, /* GL_RED_BIAS */
- { 25057, 0x00000D52 }, /* GL_RED_BITS */
- { 25069, 0x00000D14 }, /* GL_RED_SCALE */
- { 25082, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 25100, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 25122, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 25143, 0x00001C00 }, /* GL_RENDER */
- { 25153, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 25181, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 25201, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 25228, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 25264, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 25290, 0x00001F01 }, /* GL_RENDERER */
- { 25302, 0x00000C40 }, /* GL_RENDER_MODE */
- { 25317, 0x00002901 }, /* GL_REPEAT */
- { 25327, 0x00001E01 }, /* GL_REPLACE */
- { 25338, 0x00008062 }, /* GL_REPLACE_EXT */
- { 25353, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 25376, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 25394, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 25416, 0x00000102 }, /* GL_RETURN */
- { 25426, 0x00001907 }, /* GL_RGB */
- { 25433, 0x00008052 }, /* GL_RGB10 */
- { 25442, 0x00008059 }, /* GL_RGB10_A2 */
- { 25454, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 25470, 0x00008052 }, /* GL_RGB10_EXT */
- { 25483, 0x00008053 }, /* GL_RGB12 */
- { 25492, 0x00008053 }, /* GL_RGB12_EXT */
- { 25505, 0x00008054 }, /* GL_RGB16 */
- { 25514, 0x00008054 }, /* GL_RGB16_EXT */
- { 25527, 0x0000804E }, /* GL_RGB2_EXT */
- { 25539, 0x0000804F }, /* GL_RGB4 */
- { 25547, 0x0000804F }, /* GL_RGB4_EXT */
- { 25559, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 25572, 0x00008050 }, /* GL_RGB5 */
- { 25580, 0x00008057 }, /* GL_RGB5_A1 */
- { 25591, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 25606, 0x00008050 }, /* GL_RGB5_EXT */
- { 25618, 0x00008051 }, /* GL_RGB8 */
- { 25626, 0x00008051 }, /* GL_RGB8_EXT */
- { 25638, 0x00001908 }, /* GL_RGBA */
- { 25646, 0x0000805A }, /* GL_RGBA12 */
- { 25656, 0x0000805A }, /* GL_RGBA12_EXT */
- { 25670, 0x0000805B }, /* GL_RGBA16 */
- { 25680, 0x0000805B }, /* GL_RGBA16_EXT */
- { 25694, 0x00008055 }, /* GL_RGBA2 */
- { 25703, 0x00008055 }, /* GL_RGBA2_EXT */
- { 25716, 0x00008056 }, /* GL_RGBA4 */
- { 25725, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 25744, 0x00008056 }, /* GL_RGBA4_EXT */
- { 25757, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 25771, 0x00008058 }, /* GL_RGBA8 */
- { 25780, 0x00008058 }, /* GL_RGBA8_EXT */
- { 25793, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 25811, 0x00000C31 }, /* GL_RGBA_MODE */
- { 25824, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 25837, 0x000083A0 }, /* GL_RGB_S3TC */
- { 25849, 0x00008573 }, /* GL_RGB_SCALE */
- { 25862, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 25879, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 25896, 0x00000407 }, /* GL_RIGHT */
- { 25905, 0x00002000 }, /* GL_S */
- { 25910, 0x000080A9 }, /* GL_SAMPLES */
- { 25921, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 25937, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 25952, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 25970, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 25992, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 26020, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 26052, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 26075, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 26102, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 26120, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 26143, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 26165, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 26184, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 26207, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 26233, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 26263, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 26288, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 26317, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 26332, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 26347, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 26363, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 26388, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 26428, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 26472, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 26505, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 26535, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 26567, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 26597, 0x00001C02 }, /* GL_SELECT */
- { 26607, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 26635, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 26660, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 26676, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 26703, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 26734, 0x0000150F }, /* GL_SET */
- { 26741, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 26762, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 26777, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 26800, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 26830, 0x00001601 }, /* GL_SHININESS */
- { 26843, 0x00001402 }, /* GL_SHORT */
- { 26852, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 26868, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 26888, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 26907, 0x00001D01 }, /* GL_SMOOTH */
- { 26917, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 26950, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 26977, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 27010, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 27037, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 27054, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 27075, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 27096, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 27111, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 27130, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 27149, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 27166, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 27187, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 27208, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 27223, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 27242, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 27261, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 27278, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 27299, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 27320, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 27335, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 27354, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 27373, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 27393, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 27411, 0x00001202 }, /* GL_SPECULAR */
- { 27423, 0x00002402 }, /* GL_SPHERE_MAP */
- { 27437, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 27452, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 27470, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 27487, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 27501, 0x00008580 }, /* GL_SRC0_RGB */
- { 27513, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 27527, 0x00008581 }, /* GL_SRC1_RGB */
- { 27539, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 27553, 0x00008582 }, /* GL_SRC2_RGB */
- { 27565, 0x00000302 }, /* GL_SRC_ALPHA */
- { 27578, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 27600, 0x00000300 }, /* GL_SRC_COLOR */
- { 27613, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 27631, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 27650, 0x000088E6 }, /* GL_STATIC_COPY */
- { 27665, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 27684, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 27699, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 27718, 0x000088E5 }, /* GL_STATIC_READ */
- { 27733, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 27752, 0x00001802 }, /* GL_STENCIL */
- { 27763, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 27789, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 27805, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 27827, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 27850, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 27866, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 27882, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 27899, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 27922, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 27944, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 27966, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 27988, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 28009, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 28036, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 28063, 0x00000B97 }, /* GL_STENCIL_REF */
- { 28078, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 28094, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 28123, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 28145, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 28166, 0x00000C33 }, /* GL_STEREO */
- { 28176, 0x000088E2 }, /* GL_STREAM_COPY */
- { 28191, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 28210, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 28225, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 28244, 0x000088E1 }, /* GL_STREAM_READ */
- { 28259, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 28278, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 28295, 0x000084E7 }, /* GL_SUBTRACT */
- { 28307, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 28323, 0x00002001 }, /* GL_T */
- { 28328, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 28343, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 28362, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 28378, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 28393, 0x00002A27 }, /* GL_T2F_V3F */
- { 28404, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 28423, 0x00002A28 }, /* GL_T4F_V4F */
- { 28434, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 28457, 0x00001702 }, /* GL_TEXTURE */
- { 28468, 0x000084C0 }, /* GL_TEXTURE0 */
- { 28480, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 28496, 0x000084C1 }, /* GL_TEXTURE1 */
- { 28508, 0x000084CA }, /* GL_TEXTURE10 */
- { 28521, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 28538, 0x000084CB }, /* GL_TEXTURE11 */
- { 28551, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 28568, 0x000084CC }, /* GL_TEXTURE12 */
- { 28581, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 28598, 0x000084CD }, /* GL_TEXTURE13 */
- { 28611, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 28628, 0x000084CE }, /* GL_TEXTURE14 */
- { 28641, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 28658, 0x000084CF }, /* GL_TEXTURE15 */
- { 28671, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 28688, 0x000084D0 }, /* GL_TEXTURE16 */
- { 28701, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 28718, 0x000084D1 }, /* GL_TEXTURE17 */
- { 28731, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 28748, 0x000084D2 }, /* GL_TEXTURE18 */
- { 28761, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 28778, 0x000084D3 }, /* GL_TEXTURE19 */
- { 28791, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 28808, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 28824, 0x000084C2 }, /* GL_TEXTURE2 */
- { 28836, 0x000084D4 }, /* GL_TEXTURE20 */
- { 28849, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 28866, 0x000084D5 }, /* GL_TEXTURE21 */
- { 28879, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 28896, 0x000084D6 }, /* GL_TEXTURE22 */
- { 28909, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 28926, 0x000084D7 }, /* GL_TEXTURE23 */
- { 28939, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 28956, 0x000084D8 }, /* GL_TEXTURE24 */
- { 28969, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 28986, 0x000084D9 }, /* GL_TEXTURE25 */
- { 28999, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 29016, 0x000084DA }, /* GL_TEXTURE26 */
- { 29029, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 29046, 0x000084DB }, /* GL_TEXTURE27 */
- { 29059, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 29076, 0x000084DC }, /* GL_TEXTURE28 */
- { 29089, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 29106, 0x000084DD }, /* GL_TEXTURE29 */
- { 29119, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 29136, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 29152, 0x000084C3 }, /* GL_TEXTURE3 */
- { 29164, 0x000084DE }, /* GL_TEXTURE30 */
- { 29177, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 29194, 0x000084DF }, /* GL_TEXTURE31 */
- { 29207, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 29224, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 29240, 0x000084C4 }, /* GL_TEXTURE4 */
- { 29252, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 29268, 0x000084C5 }, /* GL_TEXTURE5 */
- { 29280, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 29296, 0x000084C6 }, /* GL_TEXTURE6 */
- { 29308, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 29324, 0x000084C7 }, /* GL_TEXTURE7 */
- { 29336, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 29352, 0x000084C8 }, /* GL_TEXTURE8 */
- { 29364, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 29380, 0x000084C9 }, /* GL_TEXTURE9 */
- { 29392, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 29408, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 29422, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 29436, 0x0000806F }, /* GL_TEXTURE_3D */
- { 29450, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 29472, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 29498, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 29520, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 29542, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 29564, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 29586, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 29614, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 29646, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 29679, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 29711, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 29726, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 29747, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 29772, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 29790, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 29814, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 29845, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 29875, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 29905, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 29940, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 29971, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 30009, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 30036, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 30068, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 30102, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 30126, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 30154, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 30178, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 30206, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 30239, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 30263, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 30285, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 30307, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 30333, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 30367, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 30400, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 30437, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 30465, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 30497, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 30520, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 30558, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 30600, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 30631, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 30659, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 30689, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 30717, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 30737, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 30761, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 30792, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 30827, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 30858, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 30893, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 30924, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 30959, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 30990, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 31025, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 31056, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 31091, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 31122, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 31157, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 31174, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 31196, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 31222, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 31237, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 31258, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 31278, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 31304, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 31324, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 31341, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 31358, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 31375, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 31392, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 31417, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 31439, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 31465, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 31483, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 31509, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 31535, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 31565, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 31592, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 31617, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 31637, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 31661, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 31688, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 31715, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 31742, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 31768, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 31798, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 31820, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 31838, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 31868, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 31896, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 31924, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 31952, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 31973, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 31992, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 32014, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 32033, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 32053, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 32078, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 32102, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 32122, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 32146, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 32166, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 32189, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 32214, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 32248, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 32265, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 32283, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 32301, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 32319, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 32339, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 32358, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 32387, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 32404, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 32430, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 32460, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 32492, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 32522, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 32556, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 32572, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 32603, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 32638, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 32666, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 32698, 0x00000004 }, /* GL_TRIANGLES */
- { 32711, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 32727, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 32748, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 32766, 0x00000001 }, /* GL_TRUE */
- { 32774, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 32794, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 32817, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 32837, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 32858, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 32880, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 32902, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 32922, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 32943, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 32960, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 32987, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 33010, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 33026, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 33053, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 33077, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 33108, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 33132, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 33160, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 33178, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 33208, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 33234, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 33264, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 33290, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 33314, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 33342, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 33370, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 33397, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 33429, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 33460, 0x00002A20 }, /* GL_V2F */
- { 33467, 0x00002A21 }, /* GL_V3F */
- { 33474, 0x00001F00 }, /* GL_VENDOR */
- { 33484, 0x00001F02 }, /* GL_VERSION */
- { 33495, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 33511, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 33541, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 33572, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 33607, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 33631, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 33652, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 33675, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 33696, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 33723, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 33751, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 33779, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 33807, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 33835, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 33863, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 33891, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 33918, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 33945, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 33972, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 33999, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 34026, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 34053, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 34080, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 34107, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 34134, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 34172, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 34214, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 34249, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 34287, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 34322, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 34354, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 34388, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 34420, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 34440, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 34462, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 34491, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 34512, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 34545, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 34577, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 34608, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 34638, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 34659, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 34686, 0x00000BA2 }, /* GL_VIEWPORT */
- { 34698, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 34714, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 34734, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 34765, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 34800, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 34828, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 34853, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 34880, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 34905, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 34929, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 34948, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 34962, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 34980, 0x00001506 }, /* GL_XOR */
- { 34987, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 35006, 0x00008757 }, /* GL_YCBCR_MESA */
- { 35020, 0x00000000 }, /* GL_ZERO */
- { 35028, 0x00000D16 }, /* GL_ZOOM_X */
- { 35038, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ { 418, 0x00000104 }, /* GL_ADD */
+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ { 576, 0x00001906 }, /* GL_ALPHA */
+ { 585, 0x0000803D }, /* GL_ALPHA12 */
+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
+ { 611, 0x0000803E }, /* GL_ALPHA16 */
+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
+ { 637, 0x0000803B }, /* GL_ALPHA4 */
+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
+ { 661, 0x0000803C }, /* GL_ALPHA8 */
+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
+ { 779, 0x00000207 }, /* GL_ALWAYS */
+ { 789, 0x00001200 }, /* GL_AMBIENT */
+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
+ { 823, 0x00001501 }, /* GL_AND */
+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
+ { 1107, 0x00000409 }, /* GL_AUX0 */
+ { 1115, 0x0000040A }, /* GL_AUX1 */
+ { 1123, 0x0000040B }, /* GL_AUX2 */
+ { 1131, 0x0000040C }, /* GL_AUX3 */
+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
+ { 1154, 0x00000405 }, /* GL_BACK */
+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
+ { 1189, 0x000080E0 }, /* GL_BGR */
+ { 1196, 0x000080E1 }, /* GL_BGRA */
+ { 1204, 0x00001A00 }, /* GL_BITMAP */
+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
+ { 1230, 0x00000BE2 }, /* GL_BLEND */
+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
+ { 1489, 0x00001905 }, /* GL_BLUE */
+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
+ { 1537, 0x00008B56 }, /* GL_BOOL */
+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+ { 1841, 0x00001400 }, /* GL_BYTE */
+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
+ { 1899, 0x00000901 }, /* GL_CCW */
+ { 1906, 0x00002900 }, /* GL_CLAMP */
+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+ { 2020, 0x00001500 }, /* GL_CLEAR */
+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ { 2314, 0x00000A00 }, /* GL_COEFF */
+ { 2323, 0x00001800 }, /* GL_COLOR */
+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+ { 3988, 0x00008570 }, /* GL_COMBINE */
+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+ { 4153, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+ { 4177, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+ { 4205, 0x00001300 }, /* GL_COMPILE */
+ { 4216, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+ { 4239, 0x00008B81 }, /* GL_COMPILE_STATUS */
+ { 4257, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+ { 4277, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+ { 4301, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+ { 4325, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+ { 4353, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+ { 4377, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ { 4407, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+ { 4441, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+ { 4469, 0x000084ED }, /* GL_COMPRESSED_RGB */
+ { 4487, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+ { 4506, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+ { 4529, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ { 4558, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ { 4591, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ { 4624, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ { 4657, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+ { 4679, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ { 4707, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ { 4739, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ { 4769, 0x00008576 }, /* GL_CONSTANT */
+ { 4781, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+ { 4799, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+ { 4821, 0x00008576 }, /* GL_CONSTANT_ARB */
+ { 4837, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+ { 4861, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+ { 4883, 0x00008001 }, /* GL_CONSTANT_COLOR */
+ { 4901, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+ { 4923, 0x00008576 }, /* GL_CONSTANT_EXT */
+ { 4939, 0x00008010 }, /* GL_CONVOLUTION_1D */
+ { 4957, 0x00008011 }, /* GL_CONVOLUTION_2D */
+ { 4975, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+ { 5003, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+ { 5034, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+ { 5061, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+ { 5092, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+ { 5119, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+ { 5150, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+ { 5178, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+ { 5210, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+ { 5232, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+ { 5258, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+ { 5280, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+ { 5306, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+ { 5327, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+ { 5352, 0x00008862 }, /* GL_COORD_REPLACE */
+ { 5369, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+ { 5390, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+ { 5410, 0x00001503 }, /* GL_COPY */
+ { 5418, 0x0000150C }, /* GL_COPY_INVERTED */
+ { 5435, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+ { 5455, 0x00000B44 }, /* GL_CULL_FACE */
+ { 5468, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+ { 5486, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+ { 5505, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ { 5537, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ { 5572, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+ { 5593, 0x00000001 }, /* GL_CURRENT_BIT */
+ { 5608, 0x00000B00 }, /* GL_CURRENT_COLOR */
+ { 5625, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+ { 5646, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+ { 5672, 0x00000B01 }, /* GL_CURRENT_INDEX */
+ { 5689, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+ { 5711, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ { 5739, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+ { 5760, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ { 5794, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ { 5827, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+ { 5845, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ { 5875, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+ { 5894, 0x00008865 }, /* GL_CURRENT_QUERY */
+ { 5911, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+ { 5932, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+ { 5956, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+ { 5983, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+ { 6007, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+ { 6034, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+ { 6067, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ { 6100, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+ { 6127, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+ { 6153, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+ { 6178, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+ { 6207, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+ { 6229, 0x00000900 }, /* GL_CW */
+ { 6235, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+ { 6256, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+ { 6277, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+ { 6297, 0x00002101 }, /* GL_DECAL */
+ { 6306, 0x00001E03 }, /* GL_DECR */
+ { 6314, 0x00008508 }, /* GL_DECR_WRAP */
+ { 6327, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+ { 6344, 0x00008B80 }, /* GL_DELETE_STATUS */
+ { 6361, 0x00001801 }, /* GL_DEPTH */
+ { 6370, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 6394, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 6408, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 6422, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 6442, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 6467, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 6487, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 6505, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 6526, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 6545, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 6566, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 6591, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 6617, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 6638, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 6663, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 6689, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 6710, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 6735, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 6761, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 6775, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 6790, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 6805, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 6825, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 6853, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 6881, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 6895, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 6917, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 6943, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 6962, 0x00001201 }, /* GL_DIFFUSE */
+ { 6973, 0x00000BD0 }, /* GL_DITHER */
+ { 6983, 0x00000A02 }, /* GL_DOMAIN */
+ { 6993, 0x00001100 }, /* GL_DONT_CARE */
+ { 7006, 0x000086AE }, /* GL_DOT3_RGB */
+ { 7018, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 7031, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 7048, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 7065, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 7081, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 7097, 0x0000140A }, /* GL_DOUBLE */
+ { 7107, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 7123, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 7138, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 7154, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 7194, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 7210, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 7227, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 7248, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 7269, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 7286, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 7307, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 7328, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 7345, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 7366, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 7387, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 7404, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 7425, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 7446, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 7463, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 7484, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 7505, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 7522, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 7543, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 7564, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 7584, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 7604, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 7620, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 7660, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 7676, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 7716, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 7732, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 7772, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 7788, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 7828, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 7844, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 7884, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 7900, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 7940, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 7956, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 7996, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 8012, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 8052, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 8084, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 8108, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 8128, 0x00000304 }, /* GL_DST_ALPHA */
+ { 8141, 0x00000306 }, /* GL_DST_COLOR */
+ { 8154, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 8170, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 8190, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 8206, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 8226, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 8242, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 8262, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 8275, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 8294, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 8328, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 8366, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 8393, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 8419, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 8443, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
+ { 8471, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 8503, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 8539, 0x00001600 }, /* GL_EMISSION */
+ { 8551, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 8565, 0x00000202 }, /* GL_EQUAL */
+ { 8574, 0x00001509 }, /* GL_EQUIV */
+ { 8583, 0x00010000 }, /* GL_EVAL_BIT */
+ { 8595, 0x00000800 }, /* GL_EXP */
+ { 8602, 0x00000801 }, /* GL_EXP2 */
+ { 8610, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 8624, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 8638, 0x00002502 }, /* GL_EYE_PLANE */
+ { 8651, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 8676, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 8693, 0x00000000 }, /* GL_FALSE */
+ { 8702, 0x00001101 }, /* GL_FASTEST */
+ { 8713, 0x00001C01 }, /* GL_FEEDBACK */
+ { 8725, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 8752, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 8776, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 8800, 0x00001B02 }, /* GL_FILL */
+ { 8808, 0x00001D00 }, /* GL_FLAT */
+ { 8816, 0x00001406 }, /* GL_FLOAT */
+ { 8825, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 8839, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 8857, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 8871, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 8889, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 8903, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 8921, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 8935, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 8953, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 8967, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 8985, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 8999, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 9017, 0x00000B60 }, /* GL_FOG */
+ { 9024, 0x00000080 }, /* GL_FOG_BIT */
+ { 9035, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 9048, 0x00008451 }, /* GL_FOG_COORD */
+ { 9061, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 9079, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 9103, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 9142, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 9185, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 9217, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 9248, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 9277, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 9302, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 9321, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 9355, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 9382, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 9408, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 9432, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 9449, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 9464, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 9488, 0x00000B64 }, /* GL_FOG_END */
+ { 9499, 0x00000C54 }, /* GL_FOG_HINT */
+ { 9511, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 9524, 0x00000B65 }, /* GL_FOG_MODE */
+ { 9536, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 9555, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 9580, 0x00000B63 }, /* GL_FOG_START */
+ { 9593, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 9611, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 9635, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 9654, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 9677, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 9712, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 9754, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 9796, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 9845, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 9897, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 9941, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 9968, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 9996, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 10015, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 10056, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 10097, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 10139, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 10190, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 10228, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 10277, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 10319, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 10351, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 10382, 0x00000404 }, /* GL_FRONT */
+ { 10391, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 10409, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 10423, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 10437, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 10452, 0x00008006 }, /* GL_FUNC_ADD */
+ { 10464, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 10480, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 10505, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 10534, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 10551, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 10572, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 10591, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 10615, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 10644, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 10668, 0x00000206 }, /* GL_GEQUAL */
+ { 10678, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
+ { 10703, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
+ { 10731, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
+ { 10765, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
+ { 10787, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
+ { 10815, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
+ { 10852, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
+ { 10871, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
+ { 10890, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
+ { 10909, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
+ { 10928, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
+ { 10947, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
+ { 10966, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
+ { 10990, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
+ { 11022, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
+ { 11048, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 11082, 0x00008C46 }, /* GL_GL_SLUMINANCE */
+ { 11099, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
+ { 11117, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
+ { 11142, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
+ { 11165, 0x00008C40 }, /* GL_GL_SRGB */
+ { 11176, 0x00008C41 }, /* GL_GL_SRGB8 */
+ { 11188, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
+ { 11207, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
+ { 11224, 0x00000204 }, /* GL_GREATER */
+ { 11235, 0x00001904 }, /* GL_GREEN */
+ { 11244, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 11258, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 11272, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 11287, 0x00008000 }, /* GL_HINT_BIT */
+ { 11299, 0x00008024 }, /* GL_HISTOGRAM */
+ { 11312, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 11336, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 11364, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 11387, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 11414, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 11431, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 11451, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 11475, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 11499, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 11527, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 11555, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 11587, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 11609, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 11635, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 11653, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 11675, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 11694, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 11717, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 11732, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 11752, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 11792, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 11830, 0x00001E02 }, /* GL_INCR */
+ { 11838, 0x00008507 }, /* GL_INCR_WRAP */
+ { 11851, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 11868, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 11883, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 11913, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 11947, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 11970, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 11992, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 12012, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 12026, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 12047, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 12065, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 12079, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 12095, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 12110, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 12129, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 12148, 0x00001404 }, /* GL_INT */
+ { 12155, 0x00008049 }, /* GL_INTENSITY */
+ { 12168, 0x0000804C }, /* GL_INTENSITY12 */
+ { 12183, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 12202, 0x0000804D }, /* GL_INTENSITY16 */
+ { 12217, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 12236, 0x0000804A }, /* GL_INTENSITY4 */
+ { 12250, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 12268, 0x0000804B }, /* GL_INTENSITY8 */
+ { 12282, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 12300, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 12317, 0x00008575 }, /* GL_INTERPOLATE */
+ { 12332, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 12351, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 12370, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 12382, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 12398, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 12410, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 12426, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 12438, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 12454, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 12470, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 12507, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 12528, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 12545, 0x0000862B }, /* GL_INVERSE_NV */
+ { 12559, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 12583, 0x0000150A }, /* GL_INVERT */
+ { 12593, 0x00001E00 }, /* GL_KEEP */
+ { 12601, 0x00000406 }, /* GL_LEFT */
+ { 12609, 0x00000203 }, /* GL_LEQUAL */
+ { 12619, 0x00000201 }, /* GL_LESS */
+ { 12627, 0x00004000 }, /* GL_LIGHT0 */
+ { 12637, 0x00004001 }, /* GL_LIGHT1 */
+ { 12647, 0x00004002 }, /* GL_LIGHT2 */
+ { 12657, 0x00004003 }, /* GL_LIGHT3 */
+ { 12667, 0x00004004 }, /* GL_LIGHT4 */
+ { 12677, 0x00004005 }, /* GL_LIGHT5 */
+ { 12687, 0x00004006 }, /* GL_LIGHT6 */
+ { 12697, 0x00004007 }, /* GL_LIGHT7 */
+ { 12707, 0x00000B50 }, /* GL_LIGHTING */
+ { 12719, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 12735, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 12758, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 12787, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 12820, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 12848, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 12872, 0x00001B01 }, /* GL_LINE */
+ { 12880, 0x00002601 }, /* GL_LINEAR */
+ { 12890, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 12912, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 12942, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 12973, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 12997, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 13022, 0x00000001 }, /* GL_LINES */
+ { 13031, 0x00000004 }, /* GL_LINE_BIT */
+ { 13043, 0x00000002 }, /* GL_LINE_LOOP */
+ { 13056, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 13076, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 13091, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 13111, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 13127, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 13151, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 13174, 0x00000003 }, /* GL_LINE_STRIP */
+ { 13188, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 13202, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 13216, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 13242, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 13262, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 13277, 0x00000B32 }, /* GL_LIST_BASE */
+ { 13290, 0x00020000 }, /* GL_LIST_BIT */
+ { 13302, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 13316, 0x00000B30 }, /* GL_LIST_MODE */
+ { 13329, 0x00000101 }, /* GL_LOAD */
+ { 13337, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 13349, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 13366, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 13380, 0x00001909 }, /* GL_LUMINANCE */
+ { 13393, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 13408, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 13431, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 13458, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 13480, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 13506, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 13525, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 13540, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 13563, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 13590, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 13609, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 13623, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 13644, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 13669, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 13687, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 13708, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 13733, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 13747, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 13768, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 13793, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 13811, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 13830, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 13846, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 13866, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 13888, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 13902, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 13917, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 13941, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 13965, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 13989, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 14013, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 14030, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 14047, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 14075, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 14104, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 14133, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 14162, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 14191, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 14220, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 14249, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 14277, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 14305, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 14333, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 14361, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 14389, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 14417, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 14445, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 14473, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 14501, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 14517, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 14537, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 14559, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 14573, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 14588, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 14612, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 14636, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 14660, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 14684, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 14701, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 14718, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 14746, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 14775, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 14804, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 14833, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 14862, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 14891, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 14920, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 14948, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 14976, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 15004, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 15032, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 15060, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 15088, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 15116, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 15144, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 15172, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 15185, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 15200, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 15215, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 15229, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 15245, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 15261, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 15277, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 15293, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 15309, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 15325, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 15341, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 15357, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 15373, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 15389, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 15404, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 15418, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 15434, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 15450, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 15466, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 15482, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 15498, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 15514, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 15530, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 15546, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 15562, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 15578, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 15593, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 15607, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 15623, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 15639, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 15654, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 15668, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 15683, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 15697, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 15712, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 15726, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 15741, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 15755, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 15770, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 15784, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 15799, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 15814, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 15840, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 15874, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 15905, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 15938, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 15969, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 15984, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 16006, 0x00008008 }, /* GL_MAX */
+ { 16013, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 16036, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 16062, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 16095, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 16121, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 16155, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 16174, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 16203, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 16235, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 16271, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 16307, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 16347, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 16373, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 16403, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 16428, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 16457, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 16486, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 16519, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 16539, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 16563, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 16587, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 16611, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 16636, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 16654, 0x00008008 }, /* GL_MAX_EXT */
+ { 16665, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 16700, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 16739, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 16753, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 16773, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 16811, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 16840, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 16864, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 16892, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 16915, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 16952, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 16988, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 17015, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 17044, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 17078, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 17114, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 17141, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 17173, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 17209, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 17238, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 17267, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 17295, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 17333, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 17377, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 17420, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 17454, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 17493, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 17530, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 17568, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 17611, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 17654, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 17684, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 17715, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 17751, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 17787, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 17817, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 17851, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 17884, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 17913, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 17933, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 17957, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 17979, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 18005, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 18032, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 18063, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 18087, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 18121, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 18141, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 18168, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 18189, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 18214, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 18239, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 18274, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 18296, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 18322, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 18344, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 18370, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 18404, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 18442, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 18475, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 18512, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 18536, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 18557, 0x00008007 }, /* GL_MIN */
+ { 18564, 0x0000802E }, /* GL_MINMAX */
+ { 18574, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 18588, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 18605, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 18626, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 18641, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 18660, 0x00008007 }, /* GL_MIN_EXT */
+ { 18671, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 18690, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 18713, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 18736, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 18756, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 18776, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 18806, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 18834, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 18862, 0x00001700 }, /* GL_MODELVIEW */
+ { 18875, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 18893, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 18912, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 18931, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 18950, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 18969, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 18988, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 19007, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 19026, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 19045, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 19064, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 19083, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 19101, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 19120, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 19139, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 19158, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 19177, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 19196, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 19215, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 19234, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 19253, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 19272, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 19291, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 19309, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 19328, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 19347, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 19365, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 19383, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 19401, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 19419, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 19437, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 19455, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 19473, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 19493, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 19520, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 19545, 0x00002100 }, /* GL_MODULATE */
+ { 19557, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 19577, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 19604, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 19629, 0x00000103 }, /* GL_MULT */
+ { 19637, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 19652, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 19672, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 19691, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 19710, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 19734, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 19757, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 19787, 0x00002A25 }, /* GL_N3F_V3F */
+ { 19798, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 19818, 0x0000150E }, /* GL_NAND */
+ { 19826, 0x00002600 }, /* GL_NEAREST */
+ { 19837, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 19868, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 19900, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 19925, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 19951, 0x00000200 }, /* GL_NEVER */
+ { 19960, 0x00001102 }, /* GL_NICEST */
+ { 19970, 0x00000000 }, /* GL_NONE */
+ { 19978, 0x00001505 }, /* GL_NOOP */
+ { 19986, 0x00001508 }, /* GL_NOR */
+ { 19993, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 20006, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 20022, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 20053, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 20088, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 20112, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 20135, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 20156, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 20170, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 20188, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 20205, 0x00000205 }, /* GL_NOTEQUAL */
+ { 20217, 0x00000000 }, /* GL_NO_ERROR */
+ { 20229, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 20263, 0x000086A2 }, /* GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 20301, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 20333, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 20375, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 20405, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 20445, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 20476, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 20505, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 20533, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 20563, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 20580, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 20606, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 20622, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 20657, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 20679, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 20698, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 20728, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 20749, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 20777, 0x00000001 }, /* GL_ONE */
+ { 20784, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 20812, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 20844, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 20872, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 20904, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 20927, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 20950, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 20973, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 20996, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 21014, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 21036, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 21058, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 21074, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 21094, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 21114, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 21132, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 21154, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 21176, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 21192, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 21212, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 21232, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 21250, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 21272, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 21294, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 21310, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 21330, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 21350, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 21371, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 21390, 0x00001507 }, /* GL_OR */
+ { 21396, 0x00000A01 }, /* GL_ORDER */
+ { 21405, 0x0000150D }, /* GL_OR_INVERTED */
+ { 21420, 0x0000150B }, /* GL_OR_REVERSE */
+ { 21434, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 21451, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 21469, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 21490, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 21510, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 21528, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 21547, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 21567, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 21587, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 21605, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 21624, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 21649, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 21673, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 21694, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 21716, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 21738, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 21763, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 21787, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 21808, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 21830, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 21852, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 21874, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 21905, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 21925, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 21950, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 21970, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 21995, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 22015, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 22040, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 22060, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 22085, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 22105, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 22130, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 22150, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 22175, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 22195, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 22220, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 22240, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 22265, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 22285, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 22310, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 22330, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 22355, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 22373, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 22406, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 22431, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 22466, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 22493, 0x00001B00 }, /* GL_POINT */
+ { 22502, 0x00000000 }, /* GL_POINTS */
+ { 22512, 0x00000002 }, /* GL_POINT_BIT */
+ { 22525, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 22555, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 22589, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 22623, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 22658, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 22687, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 22720, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 22753, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 22787, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 22801, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 22827, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 22845, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 22867, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 22889, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 22912, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 22930, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 22952, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 22974, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 22997, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 23017, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 23033, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 23054, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 23070, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 23090, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 23119, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 23138, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 23164, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 23179, 0x00000009 }, /* GL_POLYGON */
+ { 23190, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 23205, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 23221, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 23244, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 23269, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 23292, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 23315, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 23339, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 23363, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 23381, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 23404, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 23423, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 23446, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 23463, 0x00001203 }, /* GL_POSITION */
+ { 23475, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 23507, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 23543, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 23576, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 23613, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 23644, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 23679, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 23711, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 23747, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 23780, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 23812, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 23848, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 23881, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 23918, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 23948, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 23982, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 24013, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 24048, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 24079, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 24114, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 24146, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 24182, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 24212, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 24246, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 24277, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 24312, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 24344, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 24375, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 24410, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 24442, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 24478, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 24507, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 24540, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 24570, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 24604, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 24643, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 24676, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 24716, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 24750, 0x00008578 }, /* GL_PREVIOUS */
+ { 24762, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 24778, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 24794, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 24811, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 24832, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 24853, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 24886, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 24918, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 24941, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 24964, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 24994, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 25023, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 25051, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 25073, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 25101, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 25129, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 25151, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 25172, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 25212, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 25251, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 25281, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 25316, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 25349, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 25383, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 25422, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 25461, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 25483, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 25509, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 25533, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 25556, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 25578, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 25599, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 25620, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 25647, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 25679, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 25711, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 25746, 0x00001701 }, /* GL_PROJECTION */
+ { 25760, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 25781, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 25807, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 25828, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 25847, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 25870, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 25909, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 25947, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 25967, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 25991, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 26011, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 26035, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 26055, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 26088, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 26114, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 26144, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 26175, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 26205, 0x00002003 }, /* GL_Q */
+ { 26210, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 26235, 0x00000007 }, /* GL_QUADS */
+ { 26244, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 26261, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 26275, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 26297, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 26323, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 26339, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 26359, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 26385, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 26415, 0x00002002 }, /* GL_R */
+ { 26420, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 26432, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 26465, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 26480, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 26512, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 26536, 0x000088B8 }, /* GL_READ_ONLY */
+ { 26549, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 26566, 0x000088BA }, /* GL_READ_WRITE */
+ { 26580, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 26598, 0x00001903 }, /* GL_RED */
+ { 26605, 0x00008016 }, /* GL_REDUCE */
+ { 26615, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 26629, 0x00000D15 }, /* GL_RED_BIAS */
+ { 26641, 0x00000D52 }, /* GL_RED_BITS */
+ { 26653, 0x00000D14 }, /* GL_RED_SCALE */
+ { 26666, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 26684, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 26706, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 26727, 0x00001C00 }, /* GL_RENDER */
+ { 26737, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 26765, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 26785, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 26812, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 26848, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 26874, 0x00001F01 }, /* GL_RENDERER */
+ { 26886, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 26901, 0x00002901 }, /* GL_REPEAT */
+ { 26911, 0x00001E01 }, /* GL_REPLACE */
+ { 26922, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 26937, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 26960, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 26978, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 27000, 0x00000102 }, /* GL_RETURN */
+ { 27010, 0x00001907 }, /* GL_RGB */
+ { 27017, 0x00008052 }, /* GL_RGB10 */
+ { 27026, 0x00008059 }, /* GL_RGB10_A2 */
+ { 27038, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 27054, 0x00008052 }, /* GL_RGB10_EXT */
+ { 27067, 0x00008053 }, /* GL_RGB12 */
+ { 27076, 0x00008053 }, /* GL_RGB12_EXT */
+ { 27089, 0x00008054 }, /* GL_RGB16 */
+ { 27098, 0x00008054 }, /* GL_RGB16_EXT */
+ { 27111, 0x0000804E }, /* GL_RGB2_EXT */
+ { 27123, 0x0000804F }, /* GL_RGB4 */
+ { 27131, 0x0000804F }, /* GL_RGB4_EXT */
+ { 27143, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 27156, 0x00008050 }, /* GL_RGB5 */
+ { 27164, 0x00008057 }, /* GL_RGB5_A1 */
+ { 27175, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 27190, 0x00008050 }, /* GL_RGB5_EXT */
+ { 27202, 0x00008051 }, /* GL_RGB8 */
+ { 27210, 0x00008051 }, /* GL_RGB8_EXT */
+ { 27222, 0x00001908 }, /* GL_RGBA */
+ { 27230, 0x0000805A }, /* GL_RGBA12 */
+ { 27240, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 27254, 0x0000805B }, /* GL_RGBA16 */
+ { 27264, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 27278, 0x00008055 }, /* GL_RGBA2 */
+ { 27287, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 27300, 0x00008056 }, /* GL_RGBA4 */
+ { 27309, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 27328, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 27341, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 27355, 0x00008058 }, /* GL_RGBA8 */
+ { 27364, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 27377, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 27395, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 27408, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 27421, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 27433, 0x00008573 }, /* GL_RGB_SCALE */
+ { 27446, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 27463, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 27480, 0x00000407 }, /* GL_RIGHT */
+ { 27489, 0x00002000 }, /* GL_S */
+ { 27494, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 27508, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 27529, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 27543, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 27564, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 27578, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 27594, 0x000080A9 }, /* GL_SAMPLES */
+ { 27605, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 27621, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 27636, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 27654, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 27676, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 27704, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 27736, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 27759, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 27786, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 27804, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 27827, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 27849, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 27868, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 27891, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 27917, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 27947, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 27972, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 28001, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 28016, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 28031, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 28047, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 28072, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 28112, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 28156, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 28189, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 28219, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 28251, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 28281, 0x00001C02 }, /* GL_SELECT */
+ { 28291, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 28319, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 28344, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 28360, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 28387, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 28418, 0x0000150F }, /* GL_SET */
+ { 28425, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 28446, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 28470, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 28485, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 28500, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 28528, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 28551, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 28581, 0x00001601 }, /* GL_SHININESS */
+ { 28594, 0x00001402 }, /* GL_SHORT */
+ { 28603, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 28619, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 28639, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 28658, 0x00001D01 }, /* GL_SMOOTH */
+ { 28668, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 28701, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 28728, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 28761, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 28788, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 28805, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 28826, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 28847, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 28862, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 28881, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 28900, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 28917, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 28938, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 28959, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 28974, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 28993, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 29012, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 29029, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 29050, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 29071, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 29086, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 29105, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 29124, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 29144, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 29162, 0x00001202 }, /* GL_SPECULAR */
+ { 29174, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 29188, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 29203, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 29221, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 29238, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 29252, 0x00008580 }, /* GL_SRC0_RGB */
+ { 29264, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 29278, 0x00008581 }, /* GL_SRC1_RGB */
+ { 29290, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 29304, 0x00008582 }, /* GL_SRC2_RGB */
+ { 29316, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 29329, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 29351, 0x00000300 }, /* GL_SRC_COLOR */
+ { 29364, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 29382, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 29401, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 29416, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 29435, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 29450, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 29469, 0x000088E5 }, /* GL_STATIC_READ */
+ { 29484, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 29503, 0x00001802 }, /* GL_STENCIL */
+ { 29514, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 29540, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 29561, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 29582, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 29614, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 29646, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 29666, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 29693, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 29719, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 29735, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 29757, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 29780, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 29796, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 29812, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 29829, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 29852, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 29874, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 29896, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 29918, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 29939, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 29966, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 29993, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 30008, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 30024, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 30053, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 30075, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 30096, 0x00000C33 }, /* GL_STEREO */
+ { 30106, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 30121, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 30140, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 30155, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 30174, 0x000088E1 }, /* GL_STREAM_READ */
+ { 30189, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 30208, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 30225, 0x000084E7 }, /* GL_SUBTRACT */
+ { 30237, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 30253, 0x00002001 }, /* GL_T */
+ { 30258, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 30273, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 30292, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 30308, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 30323, 0x00002A27 }, /* GL_T2F_V3F */
+ { 30334, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 30353, 0x00002A28 }, /* GL_T4F_V4F */
+ { 30364, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 30387, 0x00001702 }, /* GL_TEXTURE */
+ { 30398, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 30410, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 30426, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 30438, 0x000084CA }, /* GL_TEXTURE10 */
+ { 30451, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 30468, 0x000084CB }, /* GL_TEXTURE11 */
+ { 30481, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 30498, 0x000084CC }, /* GL_TEXTURE12 */
+ { 30511, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 30528, 0x000084CD }, /* GL_TEXTURE13 */
+ { 30541, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 30558, 0x000084CE }, /* GL_TEXTURE14 */
+ { 30571, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 30588, 0x000084CF }, /* GL_TEXTURE15 */
+ { 30601, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 30618, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 30631, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 30648, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 30661, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 30678, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 30691, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 30708, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 30721, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 30738, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 30754, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 30766, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 30779, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 30796, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 30809, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 30826, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 30839, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 30856, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 30869, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 30886, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 30899, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 30916, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 30929, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 30946, 0x000084DA }, /* GL_TEXTURE26 */
+ { 30959, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 30976, 0x000084DB }, /* GL_TEXTURE27 */
+ { 30989, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 31006, 0x000084DC }, /* GL_TEXTURE28 */
+ { 31019, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 31036, 0x000084DD }, /* GL_TEXTURE29 */
+ { 31049, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 31066, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 31082, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 31094, 0x000084DE }, /* GL_TEXTURE30 */
+ { 31107, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 31124, 0x000084DF }, /* GL_TEXTURE31 */
+ { 31137, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 31154, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 31170, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 31182, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 31198, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 31210, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 31226, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 31238, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 31254, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 31266, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 31282, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 31294, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 31310, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 31322, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 31338, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 31352, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 31366, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 31380, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 31402, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 31428, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 31450, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 31472, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 31494, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 31516, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 31544, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 31576, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 31609, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 31641, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 31656, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 31677, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 31702, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 31720, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 31744, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 31775, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 31805, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 31835, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 31870, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 31901, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 31939, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 31966, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 31998, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 32032, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 32056, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 32084, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 32108, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 32136, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 32169, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 32193, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 32215, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 32237, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 32263, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 32297, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 32330, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 32367, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 32395, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 32427, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 32450, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 32488, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 32530, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 32561, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 32589, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 32619, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 32647, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 32667, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 32691, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 32722, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 32757, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 32788, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 32823, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 32854, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 32889, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 32920, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 32955, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 32986, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 33021, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 33052, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 33087, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 33104, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 33126, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 33152, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 33167, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 33188, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 33208, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 33234, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 33254, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 33271, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 33288, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 33305, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 33322, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 33347, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 33369, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 33395, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 33413, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 33439, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 33465, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 33495, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 33522, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 33547, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 33567, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 33591, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 33618, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 33645, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 33672, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 33698, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 33728, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 33750, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 33768, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 33798, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 33826, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 33854, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 33882, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 33903, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 33922, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 33944, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 33963, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 33983, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 34008, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 34032, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 34052, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 34076, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 34096, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 34119, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 34144, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 34178, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 34195, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 34213, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 34231, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 34249, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 34269, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 34288, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 34317, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 34334, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 34360, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 34390, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 34422, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 34452, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 34486, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 34502, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 34533, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 34568, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 34596, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 34628, 0x00000004 }, /* GL_TRIANGLES */
+ { 34641, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 34657, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 34678, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 34696, 0x00000001 }, /* GL_TRUE */
+ { 34704, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 34724, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 34747, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 34767, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 34788, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 34810, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 34832, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 34852, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 34873, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 34890, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 34917, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 34940, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 34956, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 34983, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 35007, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 35038, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 35062, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 35090, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 35108, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 35138, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 35164, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 35194, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 35220, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 35244, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 35272, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 35300, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 35327, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 35359, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 35390, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 35404, 0x00002A20 }, /* GL_V2F */
+ { 35411, 0x00002A21 }, /* GL_V3F */
+ { 35418, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 35437, 0x00001F00 }, /* GL_VENDOR */
+ { 35447, 0x00001F02 }, /* GL_VERSION */
+ { 35458, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 35474, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 35504, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 35535, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 35570, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 35594, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 35615, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 35638, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 35659, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 35686, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 35714, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 35742, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 35770, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 35798, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 35826, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 35854, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 35881, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 35908, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 35935, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 35962, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 35989, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 36016, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 36043, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 36070, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 36097, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 36135, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 36177, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 36208, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 36243, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 36277, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 36315, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 36346, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 36381, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 36409, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 36441, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 36471, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 36505, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 36533, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 36565, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 36585, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 36607, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 36636, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 36657, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 36686, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 36719, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 36751, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 36778, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 36809, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 36839, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 36856, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 36877, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 36904, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 36916, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 36932, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 36952, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 36983, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 37018, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 37046, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 37071, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 37098, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 37123, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 37147, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 37166, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 37180, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 37198, 0x00001506 }, /* GL_XOR */
+ { 37205, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 37224, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 37238, 0x00000000 }, /* GL_ZERO */
+ { 37246, 0x00000D16 }, /* GL_ZOOM_X */
+ { 37256, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1240] =
+static const unsigned reduced_enums[1277] =
{
- 404, /* GL_FALSE */
- 576, /* GL_LINES */
- 578, /* GL_LINE_LOOP */
- 585, /* GL_LINE_STRIP */
- 1533, /* GL_TRIANGLES */
- 1536, /* GL_TRIANGLE_STRIP */
- 1534, /* GL_TRIANGLE_FAN */
- 1127, /* GL_QUADS */
- 1129, /* GL_QUAD_STRIP */
- 1017, /* GL_POLYGON */
- 1029, /* GL_POLYGON_STIPPLE_BIT */
- 983, /* GL_PIXEL_MODE_BIT */
- 563, /* GL_LIGHTING_BIT */
- 420, /* GL_FOG_BIT */
+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ 435, /* GL_FALSE */
+ 643, /* GL_LINES */
+ 645, /* GL_LINE_LOOP */
+ 652, /* GL_LINE_STRIP */
+ 1628, /* GL_TRIANGLES */
+ 1631, /* GL_TRIANGLE_STRIP */
+ 1629, /* GL_TRIANGLE_FAN */
+ 1206, /* GL_QUADS */
+ 1208, /* GL_QUAD_STRIP */
+ 1096, /* GL_POLYGON */
+ 1108, /* GL_POLYGON_STIPPLE_BIT */
+ 1061, /* GL_PIXEL_MODE_BIT */
+ 630, /* GL_LIGHTING_BIT */
+ 457, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 594, /* GL_LOAD */
- 1169, /* GL_RETURN */
- 856, /* GL_MULT */
- 19, /* GL_ADD */
- 872, /* GL_NEVER */
- 553, /* GL_LESS */
- 394, /* GL_EQUAL */
- 552, /* GL_LEQUAL */
- 482, /* GL_GREATER */
- 887, /* GL_NOTEQUAL */
- 481, /* GL_GEQUAL */
- 42, /* GL_ALWAYS */
- 1293, /* GL_SRC_COLOR */
- 916, /* GL_ONE_MINUS_SRC_COLOR */
- 1291, /* GL_SRC_ALPHA */
- 915, /* GL_ONE_MINUS_SRC_ALPHA */
- 374, /* GL_DST_ALPHA */
- 913, /* GL_ONE_MINUS_DST_ALPHA */
- 375, /* GL_DST_COLOR */
- 914, /* GL_ONE_MINUS_DST_COLOR */
- 1292, /* GL_SRC_ALPHA_SATURATE */
- 469, /* GL_FRONT_LEFT */
- 470, /* GL_FRONT_RIGHT */
- 64, /* GL_BACK_LEFT */
- 65, /* GL_BACK_RIGHT */
- 466, /* GL_FRONT */
- 63, /* GL_BACK */
- 551, /* GL_LEFT */
- 1209, /* GL_RIGHT */
- 467, /* GL_FRONT_AND_BACK */
- 58, /* GL_AUX0 */
- 59, /* GL_AUX1 */
- 60, /* GL_AUX2 */
- 61, /* GL_AUX3 */
- 543, /* GL_INVALID_ENUM */
- 546, /* GL_INVALID_VALUE */
- 545, /* GL_INVALID_OPERATION */
- 1294, /* GL_STACK_OVERFLOW */
- 1295, /* GL_STACK_UNDERFLOW */
- 941, /* GL_OUT_OF_MEMORY */
- 544, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ 662, /* GL_LOAD */
+ 1248, /* GL_RETURN */
+ 934, /* GL_MULT */
+ 23, /* GL_ADD */
+ 950, /* GL_NEVER */
+ 620, /* GL_LESS */
+ 425, /* GL_EQUAL */
+ 619, /* GL_LEQUAL */
+ 545, /* GL_GREATER */
+ 965, /* GL_NOTEQUAL */
+ 520, /* GL_GEQUAL */
+ 46, /* GL_ALWAYS */
+ 1381, /* GL_SRC_COLOR */
+ 994, /* GL_ONE_MINUS_SRC_COLOR */
+ 1379, /* GL_SRC_ALPHA */
+ 993, /* GL_ONE_MINUS_SRC_ALPHA */
+ 405, /* GL_DST_ALPHA */
+ 991, /* GL_ONE_MINUS_DST_ALPHA */
+ 406, /* GL_DST_COLOR */
+ 992, /* GL_ONE_MINUS_DST_COLOR */
+ 1380, /* GL_SRC_ALPHA_SATURATE */
+ 508, /* GL_FRONT_LEFT */
+ 509, /* GL_FRONT_RIGHT */
+ 69, /* GL_BACK_LEFT */
+ 70, /* GL_BACK_RIGHT */
+ 505, /* GL_FRONT */
+ 68, /* GL_BACK */
+ 618, /* GL_LEFT */
+ 1288, /* GL_RIGHT */
+ 506, /* GL_FRONT_AND_BACK */
+ 63, /* GL_AUX0 */
+ 64, /* GL_AUX1 */
+ 65, /* GL_AUX2 */
+ 66, /* GL_AUX3 */
+ 610, /* GL_INVALID_ENUM */
+ 613, /* GL_INVALID_VALUE */
+ 612, /* GL_INVALID_OPERATION */
+ 1382, /* GL_STACK_OVERFLOW */
+ 1383, /* GL_STACK_UNDERFLOW */
+ 1019, /* GL_OUT_OF_MEMORY */
+ 611, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 961, /* GL_PASS_THROUGH_TOKEN */
- 1016, /* GL_POINT_TOKEN */
- 586, /* GL_LINE_TOKEN */
- 1030, /* GL_POLYGON_TOKEN */
- 69, /* GL_BITMAP_TOKEN */
- 373, /* GL_DRAW_PIXEL_TOKEN */
- 258, /* GL_COPY_PIXEL_TOKEN */
- 579, /* GL_LINE_RESET_TOKEN */
- 397, /* GL_EXP */
- 398, /* GL_EXP2 */
- 289, /* GL_CW */
- 106, /* GL_CCW */
- 127, /* GL_COEFF */
- 938, /* GL_ORDER */
- 328, /* GL_DOMAIN */
- 266, /* GL_CURRENT_COLOR */
- 269, /* GL_CURRENT_INDEX */
- 275, /* GL_CURRENT_NORMAL */
- 286, /* GL_CURRENT_TEXTURE_COORDS */
- 279, /* GL_CURRENT_RASTER_COLOR */
- 281, /* GL_CURRENT_RASTER_INDEX */
- 284, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- 282, /* GL_CURRENT_RASTER_POSITION */
- 283, /* GL_CURRENT_RASTER_POSITION_VALID */
- 280, /* GL_CURRENT_RASTER_DISTANCE */
- 1010, /* GL_POINT_SMOOTH */
- 999, /* GL_POINT_SIZE */
- 1009, /* GL_POINT_SIZE_RANGE */
- 1000, /* GL_POINT_SIZE_GRANULARITY */
- 580, /* GL_LINE_SMOOTH */
- 587, /* GL_LINE_WIDTH */
- 589, /* GL_LINE_WIDTH_RANGE */
- 588, /* GL_LINE_WIDTH_GRANULARITY */
- 582, /* GL_LINE_STIPPLE */
- 583, /* GL_LINE_STIPPLE_PATTERN */
- 584, /* GL_LINE_STIPPLE_REPEAT */
- 593, /* GL_LIST_MODE */
- 747, /* GL_MAX_LIST_NESTING */
- 590, /* GL_LIST_BASE */
- 592, /* GL_LIST_INDEX */
- 1019, /* GL_POLYGON_MODE */
- 1026, /* GL_POLYGON_SMOOTH */
- 1028, /* GL_POLYGON_STIPPLE */
- 382, /* GL_EDGE_FLAG */
- 259, /* GL_CULL_FACE */
- 260, /* GL_CULL_FACE_MODE */
- 468, /* GL_FRONT_FACE */
- 562, /* GL_LIGHTING */
- 567, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 568, /* GL_LIGHT_MODEL_TWO_SIDE */
- 564, /* GL_LIGHT_MODEL_AMBIENT */
- 1247, /* GL_SHADE_MODEL */
- 158, /* GL_COLOR_MATERIAL_FACE */
- 159, /* GL_COLOR_MATERIAL_PARAMETER */
- 157, /* GL_COLOR_MATERIAL */
- 419, /* GL_FOG */
- 441, /* GL_FOG_INDEX */
- 437, /* GL_FOG_DENSITY */
- 445, /* GL_FOG_START */
- 439, /* GL_FOG_END */
- 442, /* GL_FOG_MODE */
- 421, /* GL_FOG_COLOR */
- 317, /* GL_DEPTH_RANGE */
- 322, /* GL_DEPTH_TEST */
- 325, /* GL_DEPTH_WRITEMASK */
- 305, /* GL_DEPTH_CLEAR_VALUE */
- 316, /* GL_DEPTH_FUNC */
+ 1039, /* GL_PASS_THROUGH_TOKEN */
+ 1095, /* GL_POINT_TOKEN */
+ 653, /* GL_LINE_TOKEN */
+ 1109, /* GL_POLYGON_TOKEN */
+ 74, /* GL_BITMAP_TOKEN */
+ 404, /* GL_DRAW_PIXEL_TOKEN */
+ 270, /* GL_COPY_PIXEL_TOKEN */
+ 646, /* GL_LINE_RESET_TOKEN */
+ 428, /* GL_EXP */
+ 429, /* GL_EXP2 */
+ 303, /* GL_CW */
+ 116, /* GL_CCW */
+ 137, /* GL_COEFF */
+ 1016, /* GL_ORDER */
+ 343, /* GL_DOMAIN */
+ 278, /* GL_CURRENT_COLOR */
+ 281, /* GL_CURRENT_INDEX */
+ 287, /* GL_CURRENT_NORMAL */
+ 299, /* GL_CURRENT_TEXTURE_COORDS */
+ 292, /* GL_CURRENT_RASTER_COLOR */
+ 294, /* GL_CURRENT_RASTER_INDEX */
+ 297, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ 295, /* GL_CURRENT_RASTER_POSITION */
+ 296, /* GL_CURRENT_RASTER_POSITION_VALID */
+ 293, /* GL_CURRENT_RASTER_DISTANCE */
+ 1088, /* GL_POINT_SMOOTH */
+ 1077, /* GL_POINT_SIZE */
+ 1087, /* GL_POINT_SIZE_RANGE */
+ 1078, /* GL_POINT_SIZE_GRANULARITY */
+ 647, /* GL_LINE_SMOOTH */
+ 654, /* GL_LINE_WIDTH */
+ 656, /* GL_LINE_WIDTH_RANGE */
+ 655, /* GL_LINE_WIDTH_GRANULARITY */
+ 649, /* GL_LINE_STIPPLE */
+ 650, /* GL_LINE_STIPPLE_PATTERN */
+ 651, /* GL_LINE_STIPPLE_REPEAT */
+ 661, /* GL_LIST_MODE */
+ 819, /* GL_MAX_LIST_NESTING */
+ 658, /* GL_LIST_BASE */
+ 660, /* GL_LIST_INDEX */
+ 1098, /* GL_POLYGON_MODE */
+ 1105, /* GL_POLYGON_SMOOTH */
+ 1107, /* GL_POLYGON_STIPPLE */
+ 413, /* GL_EDGE_FLAG */
+ 271, /* GL_CULL_FACE */
+ 272, /* GL_CULL_FACE_MODE */
+ 507, /* GL_FRONT_FACE */
+ 629, /* GL_LIGHTING */
+ 634, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 635, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 631, /* GL_LIGHT_MODEL_AMBIENT */
+ 1334, /* GL_SHADE_MODEL */
+ 168, /* GL_COLOR_MATERIAL_FACE */
+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
+ 167, /* GL_COLOR_MATERIAL */
+ 456, /* GL_FOG */
+ 478, /* GL_FOG_INDEX */
+ 474, /* GL_FOG_DENSITY */
+ 482, /* GL_FOG_START */
+ 476, /* GL_FOG_END */
+ 479, /* GL_FOG_MODE */
+ 458, /* GL_FOG_COLOR */
+ 332, /* GL_DEPTH_RANGE */
+ 337, /* GL_DEPTH_TEST */
+ 340, /* GL_DEPTH_WRITEMASK */
+ 320, /* GL_DEPTH_CLEAR_VALUE */
+ 331, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1318, /* GL_STENCIL_TEST */
- 1306, /* GL_STENCIL_CLEAR_VALUE */
- 1308, /* GL_STENCIL_FUNC */
- 1320, /* GL_STENCIL_VALUE_MASK */
- 1307, /* GL_STENCIL_FAIL */
- 1315, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1316, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1317, /* GL_STENCIL_REF */
- 1321, /* GL_STENCIL_WRITEMASK */
- 720, /* GL_MATRIX_MODE */
- 877, /* GL_NORMALIZE */
- 1612, /* GL_VIEWPORT */
- 851, /* GL_MODELVIEW_STACK_DEPTH */
- 1109, /* GL_PROJECTION_STACK_DEPTH */
- 1512, /* GL_TEXTURE_STACK_DEPTH */
- 849, /* GL_MODELVIEW_MATRIX */
- 1108, /* GL_PROJECTION_MATRIX */
- 1497, /* GL_TEXTURE_MATRIX */
- 56, /* GL_ATTRIB_STACK_DEPTH */
- 117, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- 39, /* GL_ALPHA_TEST */
- 40, /* GL_ALPHA_TEST_FUNC */
- 41, /* GL_ALPHA_TEST_REF */
- 327, /* GL_DITHER */
- 73, /* GL_BLEND_DST */
- 80, /* GL_BLEND_SRC */
- 70, /* GL_BLEND */
- 596, /* GL_LOGIC_OP_MODE */
- 521, /* GL_INDEX_LOGIC_OP */
- 156, /* GL_COLOR_LOGIC_OP */
- 62, /* GL_AUX_BUFFERS */
- 338, /* GL_DRAW_BUFFER */
- 1139, /* GL_READ_BUFFER */
- 1230, /* GL_SCISSOR_BOX */
- 1231, /* GL_SCISSOR_TEST */
- 520, /* GL_INDEX_CLEAR_VALUE */
- 525, /* GL_INDEX_WRITEMASK */
- 153, /* GL_COLOR_CLEAR_VALUE */
- 195, /* GL_COLOR_WRITEMASK */
- 522, /* GL_INDEX_MODE */
- 1203, /* GL_RGBA_MODE */
- 337, /* GL_DOUBLEBUFFER */
- 1322, /* GL_STEREO */
- 1162, /* GL_RENDER_MODE */
- 962, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1011, /* GL_POINT_SMOOTH_HINT */
- 581, /* GL_LINE_SMOOTH_HINT */
- 1027, /* GL_POLYGON_SMOOTH_HINT */
- 440, /* GL_FOG_HINT */
- 1478, /* GL_TEXTURE_GEN_S */
- 1479, /* GL_TEXTURE_GEN_T */
- 1477, /* GL_TEXTURE_GEN_R */
- 1476, /* GL_TEXTURE_GEN_Q */
- 975, /* GL_PIXEL_MAP_I_TO_I */
- 981, /* GL_PIXEL_MAP_S_TO_S */
- 977, /* GL_PIXEL_MAP_I_TO_R */
- 973, /* GL_PIXEL_MAP_I_TO_G */
- 971, /* GL_PIXEL_MAP_I_TO_B */
- 969, /* GL_PIXEL_MAP_I_TO_A */
- 979, /* GL_PIXEL_MAP_R_TO_R */
- 967, /* GL_PIXEL_MAP_G_TO_G */
- 965, /* GL_PIXEL_MAP_B_TO_B */
- 963, /* GL_PIXEL_MAP_A_TO_A */
- 976, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 982, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 978, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 974, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 972, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 970, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 980, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 968, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 966, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 964, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1545, /* GL_UNPACK_SWAP_BYTES */
- 1540, /* GL_UNPACK_LSB_FIRST */
- 1541, /* GL_UNPACK_ROW_LENGTH */
- 1544, /* GL_UNPACK_SKIP_ROWS */
- 1543, /* GL_UNPACK_SKIP_PIXELS */
- 1538, /* GL_UNPACK_ALIGNMENT */
- 950, /* GL_PACK_SWAP_BYTES */
- 945, /* GL_PACK_LSB_FIRST */
- 946, /* GL_PACK_ROW_LENGTH */
- 949, /* GL_PACK_SKIP_ROWS */
- 948, /* GL_PACK_SKIP_PIXELS */
- 942, /* GL_PACK_ALIGNMENT */
- 673, /* GL_MAP_COLOR */
- 674, /* GL_MAP_STENCIL */
- 524, /* GL_INDEX_SHIFT */
- 523, /* GL_INDEX_OFFSET */
- 1151, /* GL_RED_SCALE */
- 1149, /* GL_RED_BIAS */
- 1629, /* GL_ZOOM_X */
- 1630, /* GL_ZOOM_Y */
- 486, /* GL_GREEN_SCALE */
- 484, /* GL_GREEN_BIAS */
- 86, /* GL_BLUE_SCALE */
- 84, /* GL_BLUE_BIAS */
- 38, /* GL_ALPHA_SCALE */
- 36, /* GL_ALPHA_BIAS */
- 318, /* GL_DEPTH_SCALE */
- 299, /* GL_DEPTH_BIAS */
- 743, /* GL_MAX_EVAL_ORDER */
- 746, /* GL_MAX_LIGHTS */
- 728, /* GL_MAX_CLIP_PLANES */
- 788, /* GL_MAX_TEXTURE_SIZE */
- 752, /* GL_MAX_PIXEL_MAP_TABLE */
- 724, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 749, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 750, /* GL_MAX_NAME_STACK_DEPTH */
- 778, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 789, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 799, /* GL_MAX_VIEWPORT_DIMS */
- 725, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1329, /* GL_SUBPIXEL_BITS */
- 519, /* GL_INDEX_BITS */
- 1150, /* GL_RED_BITS */
- 485, /* GL_GREEN_BITS */
- 85, /* GL_BLUE_BITS */
- 37, /* GL_ALPHA_BITS */
- 300, /* GL_DEPTH_BITS */
- 1304, /* GL_STENCIL_BITS */
+ 1413, /* GL_STENCIL_TEST */
+ 1401, /* GL_STENCIL_CLEAR_VALUE */
+ 1403, /* GL_STENCIL_FUNC */
+ 1415, /* GL_STENCIL_VALUE_MASK */
+ 1402, /* GL_STENCIL_FAIL */
+ 1410, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1411, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1412, /* GL_STENCIL_REF */
+ 1416, /* GL_STENCIL_WRITEMASK */
+ 789, /* GL_MATRIX_MODE */
+ 955, /* GL_NORMALIZE */
+ 1718, /* GL_VIEWPORT */
+ 929, /* GL_MODELVIEW_STACK_DEPTH */
+ 1188, /* GL_PROJECTION_STACK_DEPTH */
+ 1607, /* GL_TEXTURE_STACK_DEPTH */
+ 927, /* GL_MODELVIEW_MATRIX */
+ 1187, /* GL_PROJECTION_MATRIX */
+ 1592, /* GL_TEXTURE_MATRIX */
+ 61, /* GL_ATTRIB_STACK_DEPTH */
+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ 43, /* GL_ALPHA_TEST */
+ 44, /* GL_ALPHA_TEST_FUNC */
+ 45, /* GL_ALPHA_TEST_REF */
+ 342, /* GL_DITHER */
+ 78, /* GL_BLEND_DST */
+ 86, /* GL_BLEND_SRC */
+ 75, /* GL_BLEND */
+ 664, /* GL_LOGIC_OP_MODE */
+ 584, /* GL_INDEX_LOGIC_OP */
+ 166, /* GL_COLOR_LOGIC_OP */
+ 67, /* GL_AUX_BUFFERS */
+ 353, /* GL_DRAW_BUFFER */
+ 1218, /* GL_READ_BUFFER */
+ 1315, /* GL_SCISSOR_BOX */
+ 1316, /* GL_SCISSOR_TEST */
+ 583, /* GL_INDEX_CLEAR_VALUE */
+ 588, /* GL_INDEX_WRITEMASK */
+ 163, /* GL_COLOR_CLEAR_VALUE */
+ 205, /* GL_COLOR_WRITEMASK */
+ 585, /* GL_INDEX_MODE */
+ 1282, /* GL_RGBA_MODE */
+ 352, /* GL_DOUBLEBUFFER */
+ 1417, /* GL_STEREO */
+ 1241, /* GL_RENDER_MODE */
+ 1040, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1089, /* GL_POINT_SMOOTH_HINT */
+ 648, /* GL_LINE_SMOOTH_HINT */
+ 1106, /* GL_POLYGON_SMOOTH_HINT */
+ 477, /* GL_FOG_HINT */
+ 1573, /* GL_TEXTURE_GEN_S */
+ 1574, /* GL_TEXTURE_GEN_T */
+ 1572, /* GL_TEXTURE_GEN_R */
+ 1571, /* GL_TEXTURE_GEN_Q */
+ 1053, /* GL_PIXEL_MAP_I_TO_I */
+ 1059, /* GL_PIXEL_MAP_S_TO_S */
+ 1055, /* GL_PIXEL_MAP_I_TO_R */
+ 1051, /* GL_PIXEL_MAP_I_TO_G */
+ 1049, /* GL_PIXEL_MAP_I_TO_B */
+ 1047, /* GL_PIXEL_MAP_I_TO_A */
+ 1057, /* GL_PIXEL_MAP_R_TO_R */
+ 1045, /* GL_PIXEL_MAP_G_TO_G */
+ 1043, /* GL_PIXEL_MAP_B_TO_B */
+ 1041, /* GL_PIXEL_MAP_A_TO_A */
+ 1054, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1060, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1056, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1052, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1050, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1048, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1058, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1046, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1044, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1042, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1640, /* GL_UNPACK_SWAP_BYTES */
+ 1635, /* GL_UNPACK_LSB_FIRST */
+ 1636, /* GL_UNPACK_ROW_LENGTH */
+ 1639, /* GL_UNPACK_SKIP_ROWS */
+ 1638, /* GL_UNPACK_SKIP_PIXELS */
+ 1633, /* GL_UNPACK_ALIGNMENT */
+ 1028, /* GL_PACK_SWAP_BYTES */
+ 1023, /* GL_PACK_LSB_FIRST */
+ 1024, /* GL_PACK_ROW_LENGTH */
+ 1027, /* GL_PACK_SKIP_ROWS */
+ 1026, /* GL_PACK_SKIP_PIXELS */
+ 1020, /* GL_PACK_ALIGNMENT */
+ 742, /* GL_MAP_COLOR */
+ 743, /* GL_MAP_STENCIL */
+ 587, /* GL_INDEX_SHIFT */
+ 586, /* GL_INDEX_OFFSET */
+ 1230, /* GL_RED_SCALE */
+ 1228, /* GL_RED_BIAS */
+ 1735, /* GL_ZOOM_X */
+ 1736, /* GL_ZOOM_Y */
+ 549, /* GL_GREEN_SCALE */
+ 547, /* GL_GREEN_BIAS */
+ 92, /* GL_BLUE_SCALE */
+ 90, /* GL_BLUE_BIAS */
+ 42, /* GL_ALPHA_SCALE */
+ 40, /* GL_ALPHA_BIAS */
+ 333, /* GL_DEPTH_SCALE */
+ 314, /* GL_DEPTH_BIAS */
+ 814, /* GL_MAX_EVAL_ORDER */
+ 818, /* GL_MAX_LIGHTS */
+ 797, /* GL_MAX_CLIP_PLANES */
+ 862, /* GL_MAX_TEXTURE_SIZE */
+ 824, /* GL_MAX_PIXEL_MAP_TABLE */
+ 793, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 821, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 822, /* GL_MAX_NAME_STACK_DEPTH */
+ 850, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 863, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 877, /* GL_MAX_VIEWPORT_DIMS */
+ 794, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1424, /* GL_SUBPIXEL_BITS */
+ 582, /* GL_INDEX_BITS */
+ 1229, /* GL_RED_BITS */
+ 548, /* GL_GREEN_BITS */
+ 91, /* GL_BLUE_BITS */
+ 41, /* GL_ALPHA_BITS */
+ 315, /* GL_DEPTH_BITS */
+ 1399, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 865, /* GL_NAME_STACK_DEPTH */
- 57, /* GL_AUTO_NORMAL */
- 619, /* GL_MAP1_COLOR_4 */
- 622, /* GL_MAP1_INDEX */
- 623, /* GL_MAP1_NORMAL */
- 624, /* GL_MAP1_TEXTURE_COORD_1 */
- 625, /* GL_MAP1_TEXTURE_COORD_2 */
- 626, /* GL_MAP1_TEXTURE_COORD_3 */
- 627, /* GL_MAP1_TEXTURE_COORD_4 */
- 628, /* GL_MAP1_VERTEX_3 */
- 629, /* GL_MAP1_VERTEX_4 */
- 646, /* GL_MAP2_COLOR_4 */
- 649, /* GL_MAP2_INDEX */
- 650, /* GL_MAP2_NORMAL */
- 651, /* GL_MAP2_TEXTURE_COORD_1 */
- 652, /* GL_MAP2_TEXTURE_COORD_2 */
- 653, /* GL_MAP2_TEXTURE_COORD_3 */
- 654, /* GL_MAP2_TEXTURE_COORD_4 */
- 655, /* GL_MAP2_VERTEX_3 */
- 656, /* GL_MAP2_VERTEX_4 */
- 620, /* GL_MAP1_GRID_DOMAIN */
- 621, /* GL_MAP1_GRID_SEGMENTS */
- 647, /* GL_MAP2_GRID_DOMAIN */
- 648, /* GL_MAP2_GRID_SEGMENTS */
- 1406, /* GL_TEXTURE_1D */
- 1407, /* GL_TEXTURE_2D */
- 407, /* GL_FEEDBACK_BUFFER_POINTER */
- 408, /* GL_FEEDBACK_BUFFER_SIZE */
- 409, /* GL_FEEDBACK_BUFFER_TYPE */
- 1240, /* GL_SELECTION_BUFFER_POINTER */
- 1241, /* GL_SELECTION_BUFFER_SIZE */
- 1515, /* GL_TEXTURE_WIDTH */
- 1483, /* GL_TEXTURE_HEIGHT */
- 1439, /* GL_TEXTURE_COMPONENTS */
- 1423, /* GL_TEXTURE_BORDER_COLOR */
- 1422, /* GL_TEXTURE_BORDER */
- 329, /* GL_DONT_CARE */
- 405, /* GL_FASTEST */
- 873, /* GL_NICEST */
- 43, /* GL_AMBIENT */
- 326, /* GL_DIFFUSE */
- 1280, /* GL_SPECULAR */
- 1031, /* GL_POSITION */
- 1283, /* GL_SPOT_DIRECTION */
- 1284, /* GL_SPOT_EXPONENT */
- 1282, /* GL_SPOT_CUTOFF */
- 233, /* GL_CONSTANT_ATTENUATION */
- 571, /* GL_LINEAR_ATTENUATION */
- 1126, /* GL_QUADRATIC_ATTENUATION */
- 208, /* GL_COMPILE */
- 209, /* GL_COMPILE_AND_EXECUTE */
- 101, /* GL_BYTE */
- 1546, /* GL_UNSIGNED_BYTE */
- 1251, /* GL_SHORT */
- 1555, /* GL_UNSIGNED_SHORT */
- 526, /* GL_INT */
- 1549, /* GL_UNSIGNED_INT */
- 412, /* GL_FLOAT */
+ 943, /* GL_NAME_STACK_DEPTH */
+ 62, /* GL_AUTO_NORMAL */
+ 688, /* GL_MAP1_COLOR_4 */
+ 691, /* GL_MAP1_INDEX */
+ 692, /* GL_MAP1_NORMAL */
+ 693, /* GL_MAP1_TEXTURE_COORD_1 */
+ 694, /* GL_MAP1_TEXTURE_COORD_2 */
+ 695, /* GL_MAP1_TEXTURE_COORD_3 */
+ 696, /* GL_MAP1_TEXTURE_COORD_4 */
+ 697, /* GL_MAP1_VERTEX_3 */
+ 698, /* GL_MAP1_VERTEX_4 */
+ 715, /* GL_MAP2_COLOR_4 */
+ 718, /* GL_MAP2_INDEX */
+ 719, /* GL_MAP2_NORMAL */
+ 720, /* GL_MAP2_TEXTURE_COORD_1 */
+ 721, /* GL_MAP2_TEXTURE_COORD_2 */
+ 722, /* GL_MAP2_TEXTURE_COORD_3 */
+ 723, /* GL_MAP2_TEXTURE_COORD_4 */
+ 724, /* GL_MAP2_VERTEX_3 */
+ 725, /* GL_MAP2_VERTEX_4 */
+ 689, /* GL_MAP1_GRID_DOMAIN */
+ 690, /* GL_MAP1_GRID_SEGMENTS */
+ 716, /* GL_MAP2_GRID_DOMAIN */
+ 717, /* GL_MAP2_GRID_SEGMENTS */
+ 1501, /* GL_TEXTURE_1D */
+ 1502, /* GL_TEXTURE_2D */
+ 438, /* GL_FEEDBACK_BUFFER_POINTER */
+ 439, /* GL_FEEDBACK_BUFFER_SIZE */
+ 440, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1325, /* GL_SELECTION_BUFFER_POINTER */
+ 1326, /* GL_SELECTION_BUFFER_SIZE */
+ 1610, /* GL_TEXTURE_WIDTH */
+ 1578, /* GL_TEXTURE_HEIGHT */
+ 1534, /* GL_TEXTURE_COMPONENTS */
+ 1518, /* GL_TEXTURE_BORDER_COLOR */
+ 1517, /* GL_TEXTURE_BORDER */
+ 344, /* GL_DONT_CARE */
+ 436, /* GL_FASTEST */
+ 951, /* GL_NICEST */
+ 47, /* GL_AMBIENT */
+ 341, /* GL_DIFFUSE */
+ 1368, /* GL_SPECULAR */
+ 1110, /* GL_POSITION */
+ 1371, /* GL_SPOT_DIRECTION */
+ 1372, /* GL_SPOT_EXPONENT */
+ 1370, /* GL_SPOT_CUTOFF */
+ 244, /* GL_CONSTANT_ATTENUATION */
+ 638, /* GL_LINEAR_ATTENUATION */
+ 1205, /* GL_QUADRATIC_ATTENUATION */
+ 218, /* GL_COMPILE */
+ 219, /* GL_COMPILE_AND_EXECUTE */
+ 111, /* GL_BYTE */
+ 1641, /* GL_UNSIGNED_BYTE */
+ 1339, /* GL_SHORT */
+ 1650, /* GL_UNSIGNED_SHORT */
+ 590, /* GL_INT */
+ 1644, /* GL_UNSIGNED_INT */
+ 443, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 336, /* GL_DOUBLE */
- 113, /* GL_CLEAR */
- 45, /* GL_AND */
- 47, /* GL_AND_REVERSE */
- 256, /* GL_COPY */
- 46, /* GL_AND_INVERTED */
- 875, /* GL_NOOP */
- 1625, /* GL_XOR */
- 937, /* GL_OR */
- 876, /* GL_NOR */
- 395, /* GL_EQUIV */
- 549, /* GL_INVERT */
- 940, /* GL_OR_REVERSE */
- 257, /* GL_COPY_INVERTED */
- 939, /* GL_OR_INVERTED */
- 866, /* GL_NAND */
- 1245, /* GL_SET */
- 392, /* GL_EMISSION */
- 1250, /* GL_SHININESS */
- 44, /* GL_AMBIENT_AND_DIFFUSE */
- 155, /* GL_COLOR_INDEXES */
- 816, /* GL_MODELVIEW */
- 1107, /* GL_PROJECTION */
- 1341, /* GL_TEXTURE */
- 128, /* GL_COLOR */
- 297, /* GL_DEPTH */
- 1302, /* GL_STENCIL */
- 154, /* GL_COLOR_INDEX */
- 1309, /* GL_STENCIL_INDEX */
- 306, /* GL_DEPTH_COMPONENT */
- 1146, /* GL_RED */
- 483, /* GL_GREEN */
- 83, /* GL_BLUE */
- 27, /* GL_ALPHA */
- 1170, /* GL_RGB */
- 1189, /* GL_RGBA */
- 597, /* GL_LUMINANCE */
- 618, /* GL_LUMINANCE_ALPHA */
- 68, /* GL_BITMAP */
- 988, /* GL_POINT */
- 569, /* GL_LINE */
- 410, /* GL_FILL */
- 1155, /* GL_RENDER */
- 406, /* GL_FEEDBACK */
- 1239, /* GL_SELECT */
- 411, /* GL_FLAT */
- 1255, /* GL_SMOOTH */
- 550, /* GL_KEEP */
- 1164, /* GL_REPLACE */
- 510, /* GL_INCR */
- 294, /* GL_DECR */
- 1568, /* GL_VENDOR */
- 1161, /* GL_RENDERER */
- 1569, /* GL_VERSION */
- 399, /* GL_EXTENSIONS */
- 1210, /* GL_S */
- 1332, /* GL_T */
- 1136, /* GL_R */
- 1125, /* GL_Q */
- 852, /* GL_MODULATE */
- 293, /* GL_DECAL */
- 1473, /* GL_TEXTURE_ENV_MODE */
- 1472, /* GL_TEXTURE_ENV_COLOR */
- 1471, /* GL_TEXTURE_ENV */
- 400, /* GL_EYE_LINEAR */
- 899, /* GL_OBJECT_LINEAR */
- 1281, /* GL_SPHERE_MAP */
- 1475, /* GL_TEXTURE_GEN_MODE */
- 901, /* GL_OBJECT_PLANE */
- 401, /* GL_EYE_PLANE */
- 867, /* GL_NEAREST */
- 570, /* GL_LINEAR */
- 871, /* GL_NEAREST_MIPMAP_NEAREST */
- 575, /* GL_LINEAR_MIPMAP_NEAREST */
- 870, /* GL_NEAREST_MIPMAP_LINEAR */
- 574, /* GL_LINEAR_MIPMAP_LINEAR */
- 1496, /* GL_TEXTURE_MAG_FILTER */
- 1504, /* GL_TEXTURE_MIN_FILTER */
- 1517, /* GL_TEXTURE_WRAP_S */
- 1518, /* GL_TEXTURE_WRAP_T */
- 107, /* GL_CLAMP */
- 1163, /* GL_REPEAT */
- 1025, /* GL_POLYGON_OFFSET_UNITS */
- 1024, /* GL_POLYGON_OFFSET_POINT */
- 1023, /* GL_POLYGON_OFFSET_LINE */
- 1137, /* GL_R3_G3_B2 */
- 1566, /* GL_V2F */
- 1567, /* GL_V3F */
- 104, /* GL_C4UB_V2F */
- 105, /* GL_C4UB_V3F */
- 102, /* GL_C3F_V3F */
- 864, /* GL_N3F_V3F */
- 103, /* GL_C4F_N3F_V3F */
- 1337, /* GL_T2F_V3F */
- 1339, /* GL_T4F_V4F */
- 1335, /* GL_T2F_C4UB_V3F */
- 1333, /* GL_T2F_C3F_V3F */
- 1336, /* GL_T2F_N3F_V3F */
- 1334, /* GL_T2F_C4F_N3F_V3F */
- 1338, /* GL_T4F_C4F_N3F_V4F */
- 120, /* GL_CLIP_PLANE0 */
- 121, /* GL_CLIP_PLANE1 */
- 122, /* GL_CLIP_PLANE2 */
- 123, /* GL_CLIP_PLANE3 */
- 124, /* GL_CLIP_PLANE4 */
- 125, /* GL_CLIP_PLANE5 */
- 554, /* GL_LIGHT0 */
- 555, /* GL_LIGHT1 */
- 556, /* GL_LIGHT2 */
- 557, /* GL_LIGHT3 */
- 558, /* GL_LIGHT4 */
- 559, /* GL_LIGHT5 */
- 560, /* GL_LIGHT6 */
- 561, /* GL_LIGHT7 */
- 487, /* GL_HINT_BIT */
- 235, /* GL_CONSTANT_COLOR */
- 911, /* GL_ONE_MINUS_CONSTANT_COLOR */
- 230, /* GL_CONSTANT_ALPHA */
- 909, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- 71, /* GL_BLEND_COLOR */
- 471, /* GL_FUNC_ADD */
- 800, /* GL_MIN */
- 722, /* GL_MAX */
- 76, /* GL_BLEND_EQUATION */
- 475, /* GL_FUNC_SUBTRACT */
- 473, /* GL_FUNC_REVERSE_SUBTRACT */
- 238, /* GL_CONVOLUTION_1D */
- 239, /* GL_CONVOLUTION_2D */
- 1242, /* GL_SEPARABLE_2D */
- 242, /* GL_CONVOLUTION_BORDER_MODE */
- 246, /* GL_CONVOLUTION_FILTER_SCALE */
- 244, /* GL_CONVOLUTION_FILTER_BIAS */
- 1147, /* GL_REDUCE */
- 248, /* GL_CONVOLUTION_FORMAT */
- 252, /* GL_CONVOLUTION_WIDTH */
- 250, /* GL_CONVOLUTION_HEIGHT */
- 735, /* GL_MAX_CONVOLUTION_WIDTH */
- 733, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1064, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1060, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1055, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1051, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1062, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1058, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1053, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1049, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 488, /* GL_HISTOGRAM */
- 1111, /* GL_PROXY_HISTOGRAM */
- 504, /* GL_HISTOGRAM_WIDTH */
- 494, /* GL_HISTOGRAM_FORMAT */
- 500, /* GL_HISTOGRAM_RED_SIZE */
- 496, /* GL_HISTOGRAM_GREEN_SIZE */
- 491, /* GL_HISTOGRAM_BLUE_SIZE */
- 489, /* GL_HISTOGRAM_ALPHA_SIZE */
- 498, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 502, /* GL_HISTOGRAM_SINK */
- 801, /* GL_MINMAX */
- 803, /* GL_MINMAX_FORMAT */
- 805, /* GL_MINMAX_SINK */
- 1340, /* GL_TABLE_TOO_LARGE_EXT */
- 1548, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1557, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1559, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1553, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1550, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1022, /* GL_POLYGON_OFFSET_FILL */
- 1021, /* GL_POLYGON_OFFSET_FACTOR */
- 1020, /* GL_POLYGON_OFFSET_BIAS */
- 1167, /* GL_RESCALE_NORMAL */
- 32, /* GL_ALPHA4 */
- 34, /* GL_ALPHA8 */
- 28, /* GL_ALPHA12 */
- 30, /* GL_ALPHA16 */
- 608, /* GL_LUMINANCE4 */
- 614, /* GL_LUMINANCE8 */
- 598, /* GL_LUMINANCE12 */
- 604, /* GL_LUMINANCE16 */
- 609, /* GL_LUMINANCE4_ALPHA4 */
- 612, /* GL_LUMINANCE6_ALPHA2 */
- 615, /* GL_LUMINANCE8_ALPHA8 */
- 601, /* GL_LUMINANCE12_ALPHA4 */
- 599, /* GL_LUMINANCE12_ALPHA12 */
- 605, /* GL_LUMINANCE16_ALPHA16 */
- 527, /* GL_INTENSITY */
- 532, /* GL_INTENSITY4 */
- 534, /* GL_INTENSITY8 */
- 528, /* GL_INTENSITY12 */
- 530, /* GL_INTENSITY16 */
- 1179, /* GL_RGB2_EXT */
- 1180, /* GL_RGB4 */
- 1183, /* GL_RGB5 */
- 1187, /* GL_RGB8 */
- 1171, /* GL_RGB10 */
- 1175, /* GL_RGB12 */
- 1177, /* GL_RGB16 */
- 1194, /* GL_RGBA2 */
- 1196, /* GL_RGBA4 */
- 1184, /* GL_RGB5_A1 */
- 1200, /* GL_RGBA8 */
- 1172, /* GL_RGB10_A2 */
- 1190, /* GL_RGBA12 */
- 1192, /* GL_RGBA16 */
- 1509, /* GL_TEXTURE_RED_SIZE */
- 1481, /* GL_TEXTURE_GREEN_SIZE */
- 1420, /* GL_TEXTURE_BLUE_SIZE */
- 1409, /* GL_TEXTURE_ALPHA_SIZE */
- 1494, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1485, /* GL_TEXTURE_INTENSITY_SIZE */
- 1165, /* GL_REPLACE_EXT */
- 1115, /* GL_PROXY_TEXTURE_1D */
- 1117, /* GL_PROXY_TEXTURE_2D */
- 1513, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1506, /* GL_TEXTURE_PRIORITY */
- 1511, /* GL_TEXTURE_RESIDENT */
- 1412, /* GL_TEXTURE_BINDING_1D */
- 1413, /* GL_TEXTURE_BINDING_2D */
- 1414, /* GL_TEXTURE_BINDING_3D */
- 947, /* GL_PACK_SKIP_IMAGES */
- 943, /* GL_PACK_IMAGE_HEIGHT */
- 1542, /* GL_UNPACK_SKIP_IMAGES */
- 1539, /* GL_UNPACK_IMAGE_HEIGHT */
- 1408, /* GL_TEXTURE_3D */
- 1119, /* GL_PROXY_TEXTURE_3D */
- 1468, /* GL_TEXTURE_DEPTH */
- 1516, /* GL_TEXTURE_WRAP_R */
- 723, /* GL_MAX_3D_TEXTURE_SIZE */
- 1570, /* GL_VERTEX_ARRAY */
- 878, /* GL_NORMAL_ARRAY */
- 129, /* GL_COLOR_ARRAY */
- 513, /* GL_INDEX_ARRAY */
- 1447, /* GL_TEXTURE_COORD_ARRAY */
- 383, /* GL_EDGE_FLAG_ARRAY */
- 1575, /* GL_VERTEX_ARRAY_SIZE */
- 1577, /* GL_VERTEX_ARRAY_TYPE */
- 1576, /* GL_VERTEX_ARRAY_STRIDE */
- 883, /* GL_NORMAL_ARRAY_TYPE */
- 882, /* GL_NORMAL_ARRAY_STRIDE */
- 133, /* GL_COLOR_ARRAY_SIZE */
- 135, /* GL_COLOR_ARRAY_TYPE */
- 134, /* GL_COLOR_ARRAY_STRIDE */
- 518, /* GL_INDEX_ARRAY_TYPE */
- 517, /* GL_INDEX_ARRAY_STRIDE */
- 1451, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1453, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1452, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 387, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1574, /* GL_VERTEX_ARRAY_POINTER */
- 881, /* GL_NORMAL_ARRAY_POINTER */
- 132, /* GL_COLOR_ARRAY_POINTER */
- 516, /* GL_INDEX_ARRAY_POINTER */
- 1450, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 386, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 857, /* GL_MULTISAMPLE */
- 1216, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1218, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1223, /* GL_SAMPLE_COVERAGE */
- 1220, /* GL_SAMPLE_BUFFERS */
- 1211, /* GL_SAMPLES */
- 1227, /* GL_SAMPLE_COVERAGE_VALUE */
- 1225, /* GL_SAMPLE_COVERAGE_INVERT */
- 160, /* GL_COLOR_MATRIX */
- 162, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 730, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1047, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1043, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1038, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1034, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1045, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1041, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1036, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1032, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1430, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1120, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1432, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- 75, /* GL_BLEND_DST_RGB */
- 82, /* GL_BLEND_SRC_RGB */
- 74, /* GL_BLEND_DST_ALPHA */
- 81, /* GL_BLEND_SRC_ALPHA */
- 166, /* GL_COLOR_TABLE */
- 1057, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1040, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1110, /* GL_PROXY_COLOR_TABLE */
- 1114, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1113, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- 190, /* GL_COLOR_TABLE_SCALE */
- 170, /* GL_COLOR_TABLE_BIAS */
- 175, /* GL_COLOR_TABLE_FORMAT */
- 192, /* GL_COLOR_TABLE_WIDTH */
- 187, /* GL_COLOR_TABLE_RED_SIZE */
- 178, /* GL_COLOR_TABLE_GREEN_SIZE */
- 172, /* GL_COLOR_TABLE_BLUE_SIZE */
- 167, /* GL_COLOR_TABLE_ALPHA_SIZE */
- 184, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- 181, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- 66, /* GL_BGR */
- 67, /* GL_BGRA */
- 742, /* GL_MAX_ELEMENTS_VERTICES */
- 741, /* GL_MAX_ELEMENTS_INDICES */
- 1484, /* GL_TEXTURE_INDEX_SIZE_EXT */
- 126, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1005, /* GL_POINT_SIZE_MIN */
- 1001, /* GL_POINT_SIZE_MAX */
- 995, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 991, /* GL_POINT_DISTANCE_ATTENUATION */
- 108, /* GL_CLAMP_TO_BORDER */
- 111, /* GL_CLAMP_TO_EDGE */
- 1505, /* GL_TEXTURE_MIN_LOD */
- 1503, /* GL_TEXTURE_MAX_LOD */
- 1411, /* GL_TEXTURE_BASE_LEVEL */
- 1502, /* GL_TEXTURE_MAX_LEVEL */
- 507, /* GL_IGNORE_BORDER_HP */
- 234, /* GL_CONSTANT_BORDER_HP */
- 1166, /* GL_REPLICATE_BORDER_HP */
- 240, /* GL_CONVOLUTION_BORDER_COLOR */
- 906, /* GL_OCCLUSION_TEST_HP */
- 907, /* GL_OCCLUSION_TEST_RESULT_HP */
- 572, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1424, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1426, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1428, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1429, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1427, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1425, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 726, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 727, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1067, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1069, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1066, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1068, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1492, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1493, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1491, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 477, /* GL_GENERATE_MIPMAP */
- 478, /* GL_GENERATE_MIPMAP_HINT */
- 443, /* GL_FOG_OFFSET_SGIX */
- 444, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1438, /* GL_TEXTURE_COMPARE_SGIX */
- 1437, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1488, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1480, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 307, /* GL_DEPTH_COMPONENT16 */
- 310, /* GL_DEPTH_COMPONENT24 */
- 313, /* GL_DEPTH_COMPONENT32 */
- 261, /* GL_CULL_VERTEX_EXT */
- 263, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- 262, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1622, /* GL_WRAP_BORDER_SUN */
- 1431, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 565, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1252, /* GL_SINGLE_COLOR */
- 1243, /* GL_SEPARATE_SPECULAR_COLOR */
- 1249, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 1547, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1560, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1561, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1558, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1556, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1554, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1552, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1500, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1501, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1499, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 808, /* GL_MIRRORED_REPEAT */
- 1205, /* GL_RGB_S3TC */
- 1182, /* GL_RGB4_S3TC */
- 1204, /* GL_RGBA_S3TC */
- 1199, /* GL_RGBA4_S3TC */
- 1202, /* GL_RGBA_DXT5_S3TC */
- 1197, /* GL_RGBA4_DXT5_S3TC */
- 227, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- 222, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- 223, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- 224, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 869, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 868, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 573, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 430, /* GL_FOG_COORDINATE_SOURCE */
- 422, /* GL_FOG_COORD */
- 446, /* GL_FRAGMENT_DEPTH */
- 267, /* GL_CURRENT_FOG_COORD */
- 429, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 428, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 427, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 424, /* GL_FOG_COORDINATE_ARRAY */
- 164, /* GL_COLOR_SUM */
- 285, /* GL_CURRENT_SECONDARY_COLOR */
- 1236, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1238, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1237, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1235, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1232, /* GL_SECONDARY_COLOR_ARRAY */
- 24, /* GL_ALIASED_POINT_SIZE_RANGE */
- 23, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1342, /* GL_TEXTURE0 */
- 1344, /* GL_TEXTURE1 */
- 1366, /* GL_TEXTURE2 */
- 1388, /* GL_TEXTURE3 */
- 1394, /* GL_TEXTURE4 */
- 1396, /* GL_TEXTURE5 */
- 1398, /* GL_TEXTURE6 */
- 1400, /* GL_TEXTURE7 */
- 1402, /* GL_TEXTURE8 */
- 1404, /* GL_TEXTURE9 */
- 1345, /* GL_TEXTURE10 */
- 1347, /* GL_TEXTURE11 */
- 1349, /* GL_TEXTURE12 */
- 1351, /* GL_TEXTURE13 */
- 1353, /* GL_TEXTURE14 */
- 1355, /* GL_TEXTURE15 */
- 1357, /* GL_TEXTURE16 */
- 1359, /* GL_TEXTURE17 */
- 1361, /* GL_TEXTURE18 */
- 1363, /* GL_TEXTURE19 */
- 1367, /* GL_TEXTURE20 */
- 1369, /* GL_TEXTURE21 */
- 1371, /* GL_TEXTURE22 */
- 1373, /* GL_TEXTURE23 */
- 1375, /* GL_TEXTURE24 */
- 1377, /* GL_TEXTURE25 */
- 1379, /* GL_TEXTURE26 */
- 1381, /* GL_TEXTURE27 */
- 1383, /* GL_TEXTURE28 */
- 1385, /* GL_TEXTURE29 */
- 1389, /* GL_TEXTURE30 */
- 1391, /* GL_TEXTURE31 */
- 16, /* GL_ACTIVE_TEXTURE */
- 114, /* GL_CLIENT_ACTIVE_TEXTURE */
- 790, /* GL_MAX_TEXTURE_UNITS */
- 1526, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1529, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1531, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1523, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1330, /* GL_SUBTRACT */
- 781, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- 210, /* GL_COMPRESSED_ALPHA */
- 214, /* GL_COMPRESSED_LUMINANCE */
- 215, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- 212, /* GL_COMPRESSED_INTENSITY */
- 218, /* GL_COMPRESSED_RGB */
- 219, /* GL_COMPRESSED_RGBA */
- 1445, /* GL_TEXTURE_COMPRESSION_HINT */
- 1507, /* GL_TEXTURE_RECTANGLE_ARB */
- 1417, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1123, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 779, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 319, /* GL_DEPTH_STENCIL_NV */
- 1551, /* GL_UNSIGNED_INT_24_8_NV */
- 786, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1498, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 787, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1474, /* GL_TEXTURE_FILTER_CONTROL */
- 1489, /* GL_TEXTURE_LOD_BIAS */
- 197, /* GL_COMBINE4 */
- 782, /* GL_MAX_SHININESS_NV */
- 783, /* GL_MAX_SPOT_EXPONENT_NV */
- 511, /* GL_INCR_WRAP */
- 295, /* GL_DECR_WRAP */
- 828, /* GL_MODELVIEW1_ARB */
- 884, /* GL_NORMAL_MAP */
- 1152, /* GL_REFLECTION_MAP */
- 1454, /* GL_TEXTURE_CUBE_MAP */
- 1415, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1462, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1456, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1464, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1458, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1466, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1460, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1121, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 737, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 863, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 438, /* GL_FOG_DISTANCE_MODE_NV */
- 403, /* GL_EYE_RADIAL_NV */
- 402, /* GL_EYE_PLANE_ABSOLUTE_NV */
- 196, /* GL_COMBINE */
- 203, /* GL_COMBINE_RGB */
- 198, /* GL_COMBINE_ALPHA */
- 1206, /* GL_RGB_SCALE */
- 20, /* GL_ADD_SIGNED */
- 537, /* GL_INTERPOLATE */
- 229, /* GL_CONSTANT */
- 1073, /* GL_PRIMARY_COLOR */
- 1070, /* GL_PREVIOUS */
- 1263, /* GL_SOURCE0_RGB */
- 1269, /* GL_SOURCE1_RGB */
- 1275, /* GL_SOURCE2_RGB */
- 1279, /* GL_SOURCE3_RGB_NV */
- 1260, /* GL_SOURCE0_ALPHA */
- 1266, /* GL_SOURCE1_ALPHA */
- 1272, /* GL_SOURCE2_ALPHA */
- 1278, /* GL_SOURCE3_ALPHA_NV */
- 920, /* GL_OPERAND0_RGB */
- 926, /* GL_OPERAND1_RGB */
- 932, /* GL_OPERAND2_RGB */
- 936, /* GL_OPERAND3_RGB_NV */
- 917, /* GL_OPERAND0_ALPHA */
- 923, /* GL_OPERAND1_ALPHA */
- 929, /* GL_OPERAND2_ALPHA */
- 935, /* GL_OPERAND3_ALPHA_NV */
- 1571, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- 1626, /* GL_YCBCR_422_APPLE */
- 1562, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1564, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1254, /* GL_SLICE_ACCUM_SUN */
- 1128, /* GL_QUAD_MESH_SUN */
- 1535, /* GL_TRIANGLE_MESH_SUN */
- 1603, /* GL_VERTEX_PROGRAM_ARB */
- 1611, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1596, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- 1599, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- 1600, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- 1601, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- 287, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
- 1086, /* GL_PROGRAM_LENGTH_ARB */
- 1100, /* GL_PROGRAM_STRING_ARB */
- 850, /* GL_MODELVIEW_PROJECTION_NV */
- 506, /* GL_IDENTITY_NV */
- 547, /* GL_INVERSE_NV */
- 1528, /* GL_TRANSPOSE_NV */
- 548, /* GL_INVERSE_TRANSPOSE_NV */
- 765, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 764, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 676, /* GL_MATRIX0_NV */
- 688, /* GL_MATRIX1_NV */
- 700, /* GL_MATRIX2_NV */
- 704, /* GL_MATRIX3_NV */
- 706, /* GL_MATRIX4_NV */
- 708, /* GL_MATRIX5_NV */
- 710, /* GL_MATRIX6_NV */
- 712, /* GL_MATRIX7_NV */
- 273, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- 270, /* GL_CURRENT_MATRIX_ARB */
- 1606, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- 1608, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- 1098, /* GL_PROGRAM_PARAMETER_NV */
- 1598, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- 1102, /* GL_PROGRAM_TARGET_NV */
- 1099, /* GL_PROGRAM_RESIDENT_NV */
- 1520, /* GL_TRACK_MATRIX_NV */
- 1521, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1604, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1080, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 304, /* GL_DEPTH_CLAMP_NV */
- 1578, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1585, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1586, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1587, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1588, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1589, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1590, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1591, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1592, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1593, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1579, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1580, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1581, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1582, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1583, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1584, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 630, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 637, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 638, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 639, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 640, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 641, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 642, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 643, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 644, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 645, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 631, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 632, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 633, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 634, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 635, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 636, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 657, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 664, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 665, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 666, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 667, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 668, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 669, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1079, /* GL_PROGRAM_BINDING_ARB */
- 671, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 672, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 658, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 659, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 660, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 661, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 662, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 663, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1443, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1440, /* GL_TEXTURE_COMPRESSED */
- 889, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- 228, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 798, /* GL_MAX_VERTEX_UNITS_ARB */
- 18, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1621, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1602, /* GL_VERTEX_BLEND_ARB */
- 288, /* GL_CURRENT_WEIGHT_ARB */
- 1620, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1619, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1618, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1617, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1614, /* GL_WEIGHT_ARRAY_ARB */
- 330, /* GL_DOT3_RGB */
- 331, /* GL_DOT3_RGBA */
- 226, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- 221, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 858, /* GL_MULTISAMPLE_3DFX */
- 1221, /* GL_SAMPLE_BUFFERS_3DFX */
- 1212, /* GL_SAMPLES_3DFX */
- 839, /* GL_MODELVIEW2_ARB */
- 842, /* GL_MODELVIEW3_ARB */
- 843, /* GL_MODELVIEW4_ARB */
- 844, /* GL_MODELVIEW5_ARB */
- 845, /* GL_MODELVIEW6_ARB */
- 846, /* GL_MODELVIEW7_ARB */
- 847, /* GL_MODELVIEW8_ARB */
- 848, /* GL_MODELVIEW9_ARB */
- 818, /* GL_MODELVIEW10_ARB */
- 819, /* GL_MODELVIEW11_ARB */
- 820, /* GL_MODELVIEW12_ARB */
- 821, /* GL_MODELVIEW13_ARB */
- 822, /* GL_MODELVIEW14_ARB */
- 823, /* GL_MODELVIEW15_ARB */
- 824, /* GL_MODELVIEW16_ARB */
- 825, /* GL_MODELVIEW17_ARB */
- 826, /* GL_MODELVIEW18_ARB */
- 827, /* GL_MODELVIEW19_ARB */
- 829, /* GL_MODELVIEW20_ARB */
- 830, /* GL_MODELVIEW21_ARB */
- 831, /* GL_MODELVIEW22_ARB */
- 832, /* GL_MODELVIEW23_ARB */
- 833, /* GL_MODELVIEW24_ARB */
- 834, /* GL_MODELVIEW25_ARB */
- 835, /* GL_MODELVIEW26_ARB */
- 836, /* GL_MODELVIEW27_ARB */
- 837, /* GL_MODELVIEW28_ARB */
- 838, /* GL_MODELVIEW29_ARB */
- 840, /* GL_MODELVIEW30_ARB */
- 841, /* GL_MODELVIEW31_ARB */
- 335, /* GL_DOT3_RGB_EXT */
- 333, /* GL_DOT3_RGBA_EXT */
- 812, /* GL_MIRROR_CLAMP_EXT */
- 815, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 853, /* GL_MODULATE_ADD_ATI */
- 854, /* GL_MODULATE_SIGNED_ADD_ATI */
- 855, /* GL_MODULATE_SUBTRACT_ATI */
- 1627, /* GL_YCBCR_MESA */
- 944, /* GL_PACK_INVERT_MESA */
- 291, /* GL_DEBUG_OBJECT_MESA */
- 292, /* GL_DEBUG_PRINT_MESA */
- 290, /* GL_DEBUG_ASSERT_MESA */
- 97, /* GL_BUFFER_SIZE */
- 99, /* GL_BUFFER_USAGE */
- 447, /* GL_FRAGMENT_PROGRAM_ARB */
- 1077, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1105, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1104, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1089, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1095, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1094, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 754, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 777, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 776, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 767, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 773, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 772, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 739, /* GL_MAX_DRAW_BUFFERS_ARB */
- 339, /* GL_DRAW_BUFFER0_ARB */
- 353, /* GL_DRAW_BUFFER1_ARB */
- 355, /* GL_DRAW_BUFFER2_ARB */
- 357, /* GL_DRAW_BUFFER3_ARB */
- 359, /* GL_DRAW_BUFFER4_ARB */
- 361, /* GL_DRAW_BUFFER5_ARB */
- 363, /* GL_DRAW_BUFFER6_ARB */
- 365, /* GL_DRAW_BUFFER7_ARB */
- 367, /* GL_DRAW_BUFFER8_ARB */
- 369, /* GL_DRAW_BUFFER9_ARB */
- 341, /* GL_DRAW_BUFFER10_ARB */
- 343, /* GL_DRAW_BUFFER11_ARB */
- 345, /* GL_DRAW_BUFFER12_ARB */
- 347, /* GL_DRAW_BUFFER13_ARB */
- 349, /* GL_DRAW_BUFFER14_ARB */
- 351, /* GL_DRAW_BUFFER15_ARB */
- 77, /* GL_BLEND_EQUATION_ALPHA_EXT */
- 721, /* GL_MATRIX_PALETTE_ARB */
- 748, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 751, /* GL_MAX_PALETTE_MATRICES_ARB */
- 276, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 715, /* GL_MATRIX_INDEX_ARRAY_ARB */
- 271, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 717, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 719, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 718, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 716, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1469, /* GL_TEXTURE_DEPTH_SIZE */
- 323, /* GL_DEPTH_TEXTURE_MODE */
- 1435, /* GL_TEXTURE_COMPARE_MODE */
- 1433, /* GL_TEXTURE_COMPARE_FUNC */
- 206, /* GL_COMPARE_R_TO_TEXTURE */
- 1012, /* GL_POINT_SPRITE_ARB */
- 254, /* GL_COORD_REPLACE_ARB */
- 1015, /* GL_POINT_SPRITE_R_MODE_NV */
- 1130, /* GL_QUERY_COUNTER_BITS */
- 277, /* GL_CURRENT_QUERY */
- 1132, /* GL_QUERY_RESULT */
- 1134, /* GL_QUERY_RESULT_AVAILABLE */
- 795, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- 1597, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- 321, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 320, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 784, /* GL_MAX_TEXTURE_COORDS_ARB */
- 785, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- 1082, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1084, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1083, /* GL_PROGRAM_FORMAT_ARB */
- 1514, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 302, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 301, /* GL_DEPTH_BOUNDS_EXT */
- 48, /* GL_ARRAY_BUFFER */
- 388, /* GL_ELEMENT_ARRAY_BUFFER */
- 50, /* GL_ARRAY_BUFFER_BINDING */
- 390, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1572, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 879, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- 130, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 514, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1448, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 384, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1233, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 425, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1615, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1594, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1085, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 760, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1091, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 769, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1103, /* GL_PROGRAM_TEMPORARIES_ARB */
- 775, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1093, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 771, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1097, /* GL_PROGRAM_PARAMETERS_ARB */
- 774, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1092, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 770, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1078, /* GL_PROGRAM_ATTRIBS_ARB */
- 755, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1090, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 768, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1076, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 753, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1088, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 766, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 761, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 757, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1106, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1525, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1142, /* GL_READ_ONLY */
- 1623, /* GL_WRITE_ONLY */
- 1144, /* GL_READ_WRITE */
- 91, /* GL_BUFFER_ACCESS */
- 93, /* GL_BUFFER_MAPPED */
- 95, /* GL_BUFFER_MAP_POINTER */
- 1519, /* GL_TIME_ELAPSED_EXT */
- 675, /* GL_MATRIX0_ARB */
- 687, /* GL_MATRIX1_ARB */
- 699, /* GL_MATRIX2_ARB */
- 703, /* GL_MATRIX3_ARB */
- 705, /* GL_MATRIX4_ARB */
- 707, /* GL_MATRIX5_ARB */
- 709, /* GL_MATRIX6_ARB */
- 711, /* GL_MATRIX7_ARB */
- 713, /* GL_MATRIX8_ARB */
- 714, /* GL_MATRIX9_ARB */
- 677, /* GL_MATRIX10_ARB */
- 678, /* GL_MATRIX11_ARB */
- 679, /* GL_MATRIX12_ARB */
- 680, /* GL_MATRIX13_ARB */
- 681, /* GL_MATRIX14_ARB */
- 682, /* GL_MATRIX15_ARB */
- 683, /* GL_MATRIX16_ARB */
- 684, /* GL_MATRIX17_ARB */
- 685, /* GL_MATRIX18_ARB */
- 686, /* GL_MATRIX19_ARB */
- 689, /* GL_MATRIX20_ARB */
- 690, /* GL_MATRIX21_ARB */
- 691, /* GL_MATRIX22_ARB */
- 692, /* GL_MATRIX23_ARB */
- 693, /* GL_MATRIX24_ARB */
- 694, /* GL_MATRIX25_ARB */
- 695, /* GL_MATRIX26_ARB */
- 696, /* GL_MATRIX27_ARB */
- 697, /* GL_MATRIX28_ARB */
- 698, /* GL_MATRIX29_ARB */
- 701, /* GL_MATRIX30_ARB */
- 702, /* GL_MATRIX31_ARB */
- 1325, /* GL_STREAM_DRAW */
- 1327, /* GL_STREAM_READ */
- 1323, /* GL_STREAM_COPY */
- 1298, /* GL_STATIC_DRAW */
- 1300, /* GL_STATIC_READ */
- 1296, /* GL_STATIC_COPY */
- 378, /* GL_DYNAMIC_DRAW */
- 380, /* GL_DYNAMIC_READ */
- 376, /* GL_DYNAMIC_COPY */
- 985, /* GL_PIXEL_PACK_BUFFER_EXT */
- 987, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- 984, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- 986, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- 758, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- 756, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 759, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 763, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 762, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 1319, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- 15, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 813, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1214, /* GL_SAMPLES_PASSED */
- 448, /* GL_FRAGMENT_SHADER_ARB */
- 1610, /* GL_VERTEX_SHADER_ARB */
- 1096, /* GL_PROGRAM_OBJECT_ARB */
- 1246, /* GL_SHADER_OBJECT_ARB */
- 745, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- 797, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- 794, /* GL_MAX_VARYING_FLOATS_ARB */
- 796, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- 732, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- 904, /* GL_OBJECT_TYPE_ARB */
- 903, /* GL_OBJECT_SUBTYPE_ARB */
- 416, /* GL_FLOAT_VEC2_ARB */
- 417, /* GL_FLOAT_VEC3_ARB */
- 418, /* GL_FLOAT_VEC4_ARB */
- 540, /* GL_INT_VEC2_ARB */
- 541, /* GL_INT_VEC3_ARB */
- 542, /* GL_INT_VEC4_ARB */
- 87, /* GL_BOOL_ARB */
- 88, /* GL_BOOL_VEC2_ARB */
- 89, /* GL_BOOL_VEC3_ARB */
- 90, /* GL_BOOL_VEC4_ARB */
- 413, /* GL_FLOAT_MAT2_ARB */
- 414, /* GL_FLOAT_MAT3_ARB */
- 415, /* GL_FLOAT_MAT4_ARB */
- 897, /* GL_OBJECT_DELETE_STATUS_ARB */
- 896, /* GL_OBJECT_COMPILE_STATUS_ARB */
- 900, /* GL_OBJECT_LINK_STATUS_ARB */
- 905, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- 898, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- 895, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- 893, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- 894, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- 902, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- 891, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- 892, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- 953, /* GL_PALETTE4_RGB8_OES */
- 955, /* GL_PALETTE4_RGBA8_OES */
- 951, /* GL_PALETTE4_R5_G6_B5_OES */
- 954, /* GL_PALETTE4_RGBA4_OES */
- 952, /* GL_PALETTE4_RGB5_A1_OES */
- 958, /* GL_PALETTE8_RGB8_OES */
- 960, /* GL_PALETTE8_RGBA8_OES */
- 956, /* GL_PALETTE8_R5_G6_B5_OES */
- 959, /* GL_PALETTE8_RGBA4_OES */
- 957, /* GL_PALETTE8_RGB5_A1_OES */
- 509, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 508, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1013, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 371, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- 1156, /* GL_RENDERBUFFER_BINDING_EXT */
- 1141, /* GL_READ_FRAMEBUFFER_EXT */
- 372, /* GL_DRAW_FRAMEBUFFER_EXT */
- 1140, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- 450, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- 449, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- 453, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- 452, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- 451, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- 455, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- 457, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- 462, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- 460, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 458, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 461, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 459, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- 463, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- 465, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- 464, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 729, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- 136, /* GL_COLOR_ATTACHMENT0_EXT */
- 143, /* GL_COLOR_ATTACHMENT1_EXT */
- 144, /* GL_COLOR_ATTACHMENT2_EXT */
- 145, /* GL_COLOR_ATTACHMENT3_EXT */
- 146, /* GL_COLOR_ATTACHMENT4_EXT */
- 147, /* GL_COLOR_ATTACHMENT5_EXT */
- 148, /* GL_COLOR_ATTACHMENT6_EXT */
- 149, /* GL_COLOR_ATTACHMENT7_EXT */
- 150, /* GL_COLOR_ATTACHMENT8_EXT */
- 151, /* GL_COLOR_ATTACHMENT9_EXT */
- 137, /* GL_COLOR_ATTACHMENT10_EXT */
- 138, /* GL_COLOR_ATTACHMENT11_EXT */
- 139, /* GL_COLOR_ATTACHMENT12_EXT */
- 140, /* GL_COLOR_ATTACHMENT13_EXT */
- 141, /* GL_COLOR_ATTACHMENT14_EXT */
- 142, /* GL_COLOR_ATTACHMENT15_EXT */
- 298, /* GL_DEPTH_ATTACHMENT_EXT */
- 1303, /* GL_STENCIL_ATTACHMENT_EXT */
- 456, /* GL_FRAMEBUFFER_EXT */
- 1157, /* GL_RENDERBUFFER_EXT */
- 1160, /* GL_RENDERBUFFER_WIDTH_EXT */
- 1158, /* GL_RENDERBUFFER_HEIGHT_EXT */
- 1159, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- 1314, /* GL_STENCIL_INDEX_EXT */
- 1311, /* GL_STENCIL_INDEX1_EXT */
- 1312, /* GL_STENCIL_INDEX4_EXT */
- 1313, /* GL_STENCIL_INDEX8_EXT */
- 1310, /* GL_STENCIL_INDEX16_EXT */
- 396, /* GL_EVAL_BIT */
- 1138, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 591, /* GL_LIST_BIT */
- 1419, /* GL_TEXTURE_BIT */
- 1229, /* GL_SCISSOR_BIT */
- 25, /* GL_ALL_ATTRIB_BITS */
- 860, /* GL_MULTISAMPLE_BIT */
- 26, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ 351, /* GL_DOUBLE */
+ 123, /* GL_CLEAR */
+ 49, /* GL_AND */
+ 51, /* GL_AND_REVERSE */
+ 268, /* GL_COPY */
+ 50, /* GL_AND_INVERTED */
+ 953, /* GL_NOOP */
+ 1731, /* GL_XOR */
+ 1015, /* GL_OR */
+ 954, /* GL_NOR */
+ 426, /* GL_EQUIV */
+ 616, /* GL_INVERT */
+ 1018, /* GL_OR_REVERSE */
+ 269, /* GL_COPY_INVERTED */
+ 1017, /* GL_OR_INVERTED */
+ 944, /* GL_NAND */
+ 1330, /* GL_SET */
+ 423, /* GL_EMISSION */
+ 1338, /* GL_SHININESS */
+ 48, /* GL_AMBIENT_AND_DIFFUSE */
+ 165, /* GL_COLOR_INDEXES */
+ 894, /* GL_MODELVIEW */
+ 1186, /* GL_PROJECTION */
+ 1436, /* GL_TEXTURE */
+ 138, /* GL_COLOR */
+ 312, /* GL_DEPTH */
+ 1390, /* GL_STENCIL */
+ 164, /* GL_COLOR_INDEX */
+ 1404, /* GL_STENCIL_INDEX */
+ 321, /* GL_DEPTH_COMPONENT */
+ 1225, /* GL_RED */
+ 546, /* GL_GREEN */
+ 89, /* GL_BLUE */
+ 31, /* GL_ALPHA */
+ 1249, /* GL_RGB */
+ 1268, /* GL_RGBA */
+ 666, /* GL_LUMINANCE */
+ 687, /* GL_LUMINANCE_ALPHA */
+ 73, /* GL_BITMAP */
+ 1066, /* GL_POINT */
+ 636, /* GL_LINE */
+ 441, /* GL_FILL */
+ 1234, /* GL_RENDER */
+ 437, /* GL_FEEDBACK */
+ 1324, /* GL_SELECT */
+ 442, /* GL_FLAT */
+ 1343, /* GL_SMOOTH */
+ 617, /* GL_KEEP */
+ 1243, /* GL_REPLACE */
+ 573, /* GL_INCR */
+ 308, /* GL_DECR */
+ 1665, /* GL_VENDOR */
+ 1240, /* GL_RENDERER */
+ 1666, /* GL_VERSION */
+ 430, /* GL_EXTENSIONS */
+ 1289, /* GL_S */
+ 1427, /* GL_T */
+ 1215, /* GL_R */
+ 1204, /* GL_Q */
+ 930, /* GL_MODULATE */
+ 307, /* GL_DECAL */
+ 1568, /* GL_TEXTURE_ENV_MODE */
+ 1567, /* GL_TEXTURE_ENV_COLOR */
+ 1566, /* GL_TEXTURE_ENV */
+ 431, /* GL_EYE_LINEAR */
+ 977, /* GL_OBJECT_LINEAR */
+ 1369, /* GL_SPHERE_MAP */
+ 1570, /* GL_TEXTURE_GEN_MODE */
+ 979, /* GL_OBJECT_PLANE */
+ 432, /* GL_EYE_PLANE */
+ 945, /* GL_NEAREST */
+ 637, /* GL_LINEAR */
+ 949, /* GL_NEAREST_MIPMAP_NEAREST */
+ 642, /* GL_LINEAR_MIPMAP_NEAREST */
+ 948, /* GL_NEAREST_MIPMAP_LINEAR */
+ 641, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1591, /* GL_TEXTURE_MAG_FILTER */
+ 1599, /* GL_TEXTURE_MIN_FILTER */
+ 1612, /* GL_TEXTURE_WRAP_S */
+ 1613, /* GL_TEXTURE_WRAP_T */
+ 117, /* GL_CLAMP */
+ 1242, /* GL_REPEAT */
+ 1104, /* GL_POLYGON_OFFSET_UNITS */
+ 1103, /* GL_POLYGON_OFFSET_POINT */
+ 1102, /* GL_POLYGON_OFFSET_LINE */
+ 1216, /* GL_R3_G3_B2 */
+ 1662, /* GL_V2F */
+ 1663, /* GL_V3F */
+ 114, /* GL_C4UB_V2F */
+ 115, /* GL_C4UB_V3F */
+ 112, /* GL_C3F_V3F */
+ 942, /* GL_N3F_V3F */
+ 113, /* GL_C4F_N3F_V3F */
+ 1432, /* GL_T2F_V3F */
+ 1434, /* GL_T4F_V4F */
+ 1430, /* GL_T2F_C4UB_V3F */
+ 1428, /* GL_T2F_C3F_V3F */
+ 1431, /* GL_T2F_N3F_V3F */
+ 1429, /* GL_T2F_C4F_N3F_V3F */
+ 1433, /* GL_T4F_C4F_N3F_V4F */
+ 130, /* GL_CLIP_PLANE0 */
+ 131, /* GL_CLIP_PLANE1 */
+ 132, /* GL_CLIP_PLANE2 */
+ 133, /* GL_CLIP_PLANE3 */
+ 134, /* GL_CLIP_PLANE4 */
+ 135, /* GL_CLIP_PLANE5 */
+ 621, /* GL_LIGHT0 */
+ 622, /* GL_LIGHT1 */
+ 623, /* GL_LIGHT2 */
+ 624, /* GL_LIGHT3 */
+ 625, /* GL_LIGHT4 */
+ 626, /* GL_LIGHT5 */
+ 627, /* GL_LIGHT6 */
+ 628, /* GL_LIGHT7 */
+ 550, /* GL_HINT_BIT */
+ 246, /* GL_CONSTANT_COLOR */
+ 989, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 241, /* GL_CONSTANT_ALPHA */
+ 987, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 76, /* GL_BLEND_COLOR */
+ 510, /* GL_FUNC_ADD */
+ 878, /* GL_MIN */
+ 791, /* GL_MAX */
+ 81, /* GL_BLEND_EQUATION */
+ 514, /* GL_FUNC_SUBTRACT */
+ 512, /* GL_FUNC_REVERSE_SUBTRACT */
+ 249, /* GL_CONVOLUTION_1D */
+ 250, /* GL_CONVOLUTION_2D */
+ 1327, /* GL_SEPARABLE_2D */
+ 253, /* GL_CONVOLUTION_BORDER_MODE */
+ 257, /* GL_CONVOLUTION_FILTER_SCALE */
+ 255, /* GL_CONVOLUTION_FILTER_BIAS */
+ 1226, /* GL_REDUCE */
+ 259, /* GL_CONVOLUTION_FORMAT */
+ 263, /* GL_CONVOLUTION_WIDTH */
+ 261, /* GL_CONVOLUTION_HEIGHT */
+ 805, /* GL_MAX_CONVOLUTION_WIDTH */
+ 803, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1143, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1139, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1134, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1130, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1141, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1137, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1132, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1128, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 551, /* GL_HISTOGRAM */
+ 1190, /* GL_PROXY_HISTOGRAM */
+ 567, /* GL_HISTOGRAM_WIDTH */
+ 557, /* GL_HISTOGRAM_FORMAT */
+ 563, /* GL_HISTOGRAM_RED_SIZE */
+ 559, /* GL_HISTOGRAM_GREEN_SIZE */
+ 554, /* GL_HISTOGRAM_BLUE_SIZE */
+ 552, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 561, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 565, /* GL_HISTOGRAM_SINK */
+ 879, /* GL_MINMAX */
+ 881, /* GL_MINMAX_FORMAT */
+ 883, /* GL_MINMAX_SINK */
+ 1435, /* GL_TABLE_TOO_LARGE_EXT */
+ 1643, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1652, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1654, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1648, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1645, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1101, /* GL_POLYGON_OFFSET_FILL */
+ 1100, /* GL_POLYGON_OFFSET_FACTOR */
+ 1099, /* GL_POLYGON_OFFSET_BIAS */
+ 1246, /* GL_RESCALE_NORMAL */
+ 36, /* GL_ALPHA4 */
+ 38, /* GL_ALPHA8 */
+ 32, /* GL_ALPHA12 */
+ 34, /* GL_ALPHA16 */
+ 677, /* GL_LUMINANCE4 */
+ 683, /* GL_LUMINANCE8 */
+ 667, /* GL_LUMINANCE12 */
+ 673, /* GL_LUMINANCE16 */
+ 678, /* GL_LUMINANCE4_ALPHA4 */
+ 681, /* GL_LUMINANCE6_ALPHA2 */
+ 684, /* GL_LUMINANCE8_ALPHA8 */
+ 670, /* GL_LUMINANCE12_ALPHA4 */
+ 668, /* GL_LUMINANCE12_ALPHA12 */
+ 674, /* GL_LUMINANCE16_ALPHA16 */
+ 591, /* GL_INTENSITY */
+ 596, /* GL_INTENSITY4 */
+ 598, /* GL_INTENSITY8 */
+ 592, /* GL_INTENSITY12 */
+ 594, /* GL_INTENSITY16 */
+ 1258, /* GL_RGB2_EXT */
+ 1259, /* GL_RGB4 */
+ 1262, /* GL_RGB5 */
+ 1266, /* GL_RGB8 */
+ 1250, /* GL_RGB10 */
+ 1254, /* GL_RGB12 */
+ 1256, /* GL_RGB16 */
+ 1273, /* GL_RGBA2 */
+ 1275, /* GL_RGBA4 */
+ 1263, /* GL_RGB5_A1 */
+ 1279, /* GL_RGBA8 */
+ 1251, /* GL_RGB10_A2 */
+ 1269, /* GL_RGBA12 */
+ 1271, /* GL_RGBA16 */
+ 1604, /* GL_TEXTURE_RED_SIZE */
+ 1576, /* GL_TEXTURE_GREEN_SIZE */
+ 1515, /* GL_TEXTURE_BLUE_SIZE */
+ 1504, /* GL_TEXTURE_ALPHA_SIZE */
+ 1589, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1580, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1244, /* GL_REPLACE_EXT */
+ 1194, /* GL_PROXY_TEXTURE_1D */
+ 1196, /* GL_PROXY_TEXTURE_2D */
+ 1608, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1601, /* GL_TEXTURE_PRIORITY */
+ 1606, /* GL_TEXTURE_RESIDENT */
+ 1507, /* GL_TEXTURE_BINDING_1D */
+ 1508, /* GL_TEXTURE_BINDING_2D */
+ 1509, /* GL_TEXTURE_BINDING_3D */
+ 1025, /* GL_PACK_SKIP_IMAGES */
+ 1021, /* GL_PACK_IMAGE_HEIGHT */
+ 1637, /* GL_UNPACK_SKIP_IMAGES */
+ 1634, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1503, /* GL_TEXTURE_3D */
+ 1198, /* GL_PROXY_TEXTURE_3D */
+ 1563, /* GL_TEXTURE_DEPTH */
+ 1611, /* GL_TEXTURE_WRAP_R */
+ 792, /* GL_MAX_3D_TEXTURE_SIZE */
+ 1667, /* GL_VERTEX_ARRAY */
+ 956, /* GL_NORMAL_ARRAY */
+ 139, /* GL_COLOR_ARRAY */
+ 576, /* GL_INDEX_ARRAY */
+ 1542, /* GL_TEXTURE_COORD_ARRAY */
+ 414, /* GL_EDGE_FLAG_ARRAY */
+ 1672, /* GL_VERTEX_ARRAY_SIZE */
+ 1674, /* GL_VERTEX_ARRAY_TYPE */
+ 1673, /* GL_VERTEX_ARRAY_STRIDE */
+ 961, /* GL_NORMAL_ARRAY_TYPE */
+ 960, /* GL_NORMAL_ARRAY_STRIDE */
+ 143, /* GL_COLOR_ARRAY_SIZE */
+ 145, /* GL_COLOR_ARRAY_TYPE */
+ 144, /* GL_COLOR_ARRAY_STRIDE */
+ 581, /* GL_INDEX_ARRAY_TYPE */
+ 580, /* GL_INDEX_ARRAY_STRIDE */
+ 1546, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1548, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1547, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 418, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 1671, /* GL_VERTEX_ARRAY_POINTER */
+ 959, /* GL_NORMAL_ARRAY_POINTER */
+ 142, /* GL_COLOR_ARRAY_POINTER */
+ 579, /* GL_INDEX_ARRAY_POINTER */
+ 1545, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 417, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 935, /* GL_MULTISAMPLE */
+ 1301, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1303, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1308, /* GL_SAMPLE_COVERAGE */
+ 1305, /* GL_SAMPLE_BUFFERS */
+ 1296, /* GL_SAMPLES */
+ 1312, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1310, /* GL_SAMPLE_COVERAGE_INVERT */
+ 170, /* GL_COLOR_MATRIX */
+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ 799, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1126, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1122, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1117, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1113, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1124, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1120, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1115, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1111, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1525, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1199, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1527, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 80, /* GL_BLEND_DST_RGB */
+ 88, /* GL_BLEND_SRC_RGB */
+ 79, /* GL_BLEND_DST_ALPHA */
+ 87, /* GL_BLEND_SRC_ALPHA */
+ 176, /* GL_COLOR_TABLE */
+ 1136, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1119, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1189, /* GL_PROXY_COLOR_TABLE */
+ 1193, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1192, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 200, /* GL_COLOR_TABLE_SCALE */
+ 180, /* GL_COLOR_TABLE_BIAS */
+ 185, /* GL_COLOR_TABLE_FORMAT */
+ 202, /* GL_COLOR_TABLE_WIDTH */
+ 197, /* GL_COLOR_TABLE_RED_SIZE */
+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ 71, /* GL_BGR */
+ 72, /* GL_BGRA */
+ 813, /* GL_MAX_ELEMENTS_VERTICES */
+ 812, /* GL_MAX_ELEMENTS_INDICES */
+ 1579, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ 1083, /* GL_POINT_SIZE_MIN */
+ 1079, /* GL_POINT_SIZE_MAX */
+ 1073, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1069, /* GL_POINT_DISTANCE_ATTENUATION */
+ 118, /* GL_CLAMP_TO_BORDER */
+ 121, /* GL_CLAMP_TO_EDGE */
+ 1600, /* GL_TEXTURE_MIN_LOD */
+ 1598, /* GL_TEXTURE_MAX_LOD */
+ 1506, /* GL_TEXTURE_BASE_LEVEL */
+ 1597, /* GL_TEXTURE_MAX_LEVEL */
+ 570, /* GL_IGNORE_BORDER_HP */
+ 245, /* GL_CONSTANT_BORDER_HP */
+ 1245, /* GL_REPLICATE_BORDER_HP */
+ 251, /* GL_CONVOLUTION_BORDER_COLOR */
+ 984, /* GL_OCCLUSION_TEST_HP */
+ 985, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 639, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1519, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1521, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1523, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1524, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1522, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1520, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 795, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 796, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1146, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1148, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1145, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1147, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1587, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1588, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1586, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 516, /* GL_GENERATE_MIPMAP */
+ 517, /* GL_GENERATE_MIPMAP_HINT */
+ 480, /* GL_FOG_OFFSET_SGIX */
+ 481, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1533, /* GL_TEXTURE_COMPARE_SGIX */
+ 1532, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1583, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1575, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 322, /* GL_DEPTH_COMPONENT16 */
+ 325, /* GL_DEPTH_COMPONENT24 */
+ 328, /* GL_DEPTH_COMPONENT32 */
+ 273, /* GL_CULL_VERTEX_EXT */
+ 275, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ 274, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ 1728, /* GL_WRAP_BORDER_SUN */
+ 1526, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 632, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1340, /* GL_SINGLE_COLOR */
+ 1328, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1337, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 1642, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1655, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1656, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1653, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1651, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1649, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1647, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1595, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1596, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1594, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 886, /* GL_MIRRORED_REPEAT */
+ 1284, /* GL_RGB_S3TC */
+ 1261, /* GL_RGB4_S3TC */
+ 1283, /* GL_RGBA_S3TC */
+ 1278, /* GL_RGBA4_S3TC */
+ 1281, /* GL_RGBA_DXT5_S3TC */
+ 1276, /* GL_RGBA4_DXT5_S3TC */
+ 238, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ 233, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ 947, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 946, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 640, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 467, /* GL_FOG_COORDINATE_SOURCE */
+ 459, /* GL_FOG_COORD */
+ 483, /* GL_FRAGMENT_DEPTH */
+ 279, /* GL_CURRENT_FOG_COORD */
+ 466, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 465, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 464, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 461, /* GL_FOG_COORDINATE_ARRAY */
+ 174, /* GL_COLOR_SUM */
+ 298, /* GL_CURRENT_SECONDARY_COLOR */
+ 1321, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1323, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1322, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1320, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1317, /* GL_SECONDARY_COLOR_ARRAY */
+ 526, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ 1437, /* GL_TEXTURE0 */
+ 1439, /* GL_TEXTURE1 */
+ 1461, /* GL_TEXTURE2 */
+ 1483, /* GL_TEXTURE3 */
+ 1489, /* GL_TEXTURE4 */
+ 1491, /* GL_TEXTURE5 */
+ 1493, /* GL_TEXTURE6 */
+ 1495, /* GL_TEXTURE7 */
+ 1497, /* GL_TEXTURE8 */
+ 1499, /* GL_TEXTURE9 */
+ 1440, /* GL_TEXTURE10 */
+ 1442, /* GL_TEXTURE11 */
+ 1444, /* GL_TEXTURE12 */
+ 1446, /* GL_TEXTURE13 */
+ 1448, /* GL_TEXTURE14 */
+ 1450, /* GL_TEXTURE15 */
+ 1452, /* GL_TEXTURE16 */
+ 1454, /* GL_TEXTURE17 */
+ 1456, /* GL_TEXTURE18 */
+ 1458, /* GL_TEXTURE19 */
+ 1462, /* GL_TEXTURE20 */
+ 1464, /* GL_TEXTURE21 */
+ 1466, /* GL_TEXTURE22 */
+ 1468, /* GL_TEXTURE23 */
+ 1470, /* GL_TEXTURE24 */
+ 1472, /* GL_TEXTURE25 */
+ 1474, /* GL_TEXTURE26 */
+ 1476, /* GL_TEXTURE27 */
+ 1478, /* GL_TEXTURE28 */
+ 1480, /* GL_TEXTURE29 */
+ 1484, /* GL_TEXTURE30 */
+ 1486, /* GL_TEXTURE31 */
+ 18, /* GL_ACTIVE_TEXTURE */
+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
+ 864, /* GL_MAX_TEXTURE_UNITS */
+ 1621, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1624, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1626, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1618, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1425, /* GL_SUBTRACT */
+ 853, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ 221, /* GL_COMPRESSED_ALPHA */
+ 225, /* GL_COMPRESSED_LUMINANCE */
+ 226, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ 223, /* GL_COMPRESSED_INTENSITY */
+ 229, /* GL_COMPRESSED_RGB */
+ 230, /* GL_COMPRESSED_RGBA */
+ 1540, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1602, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1512, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1202, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 851, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ 334, /* GL_DEPTH_STENCIL_NV */
+ 1646, /* GL_UNSIGNED_INT_24_8_NV */
+ 860, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1593, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 861, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1569, /* GL_TEXTURE_FILTER_CONTROL */
+ 1584, /* GL_TEXTURE_LOD_BIAS */
+ 207, /* GL_COMBINE4 */
+ 854, /* GL_MAX_SHININESS_NV */
+ 855, /* GL_MAX_SPOT_EXPONENT_NV */
+ 574, /* GL_INCR_WRAP */
+ 309, /* GL_DECR_WRAP */
+ 906, /* GL_MODELVIEW1_ARB */
+ 962, /* GL_NORMAL_MAP */
+ 1231, /* GL_REFLECTION_MAP */
+ 1549, /* GL_TEXTURE_CUBE_MAP */
+ 1510, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1557, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1551, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1559, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1553, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1561, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1555, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1200, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 807, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 941, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 475, /* GL_FOG_DISTANCE_MODE_NV */
+ 434, /* GL_EYE_RADIAL_NV */
+ 433, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 206, /* GL_COMBINE */
+ 213, /* GL_COMBINE_RGB */
+ 208, /* GL_COMBINE_ALPHA */
+ 1285, /* GL_RGB_SCALE */
+ 24, /* GL_ADD_SIGNED */
+ 601, /* GL_INTERPOLATE */
+ 240, /* GL_CONSTANT */
+ 1152, /* GL_PRIMARY_COLOR */
+ 1149, /* GL_PREVIOUS */
+ 1351, /* GL_SOURCE0_RGB */
+ 1357, /* GL_SOURCE1_RGB */
+ 1363, /* GL_SOURCE2_RGB */
+ 1367, /* GL_SOURCE3_RGB_NV */
+ 1348, /* GL_SOURCE0_ALPHA */
+ 1354, /* GL_SOURCE1_ALPHA */
+ 1360, /* GL_SOURCE2_ALPHA */
+ 1366, /* GL_SOURCE3_ALPHA_NV */
+ 998, /* GL_OPERAND0_RGB */
+ 1004, /* GL_OPERAND1_RGB */
+ 1010, /* GL_OPERAND2_RGB */
+ 1014, /* GL_OPERAND3_RGB_NV */
+ 995, /* GL_OPERAND0_ALPHA */
+ 1001, /* GL_OPERAND1_ALPHA */
+ 1007, /* GL_OPERAND2_ALPHA */
+ 1013, /* GL_OPERAND3_ALPHA_NV */
+ 1668, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ 1732, /* GL_YCBCR_422_APPLE */
+ 1657, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1659, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1342, /* GL_SLICE_ACCUM_SUN */
+ 1207, /* GL_QUAD_MESH_SUN */
+ 1630, /* GL_TRIANGLE_MESH_SUN */
+ 1706, /* GL_VERTEX_PROGRAM_ARB */
+ 1717, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1693, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 1699, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 1701, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 1703, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 300, /* GL_CURRENT_VERTEX_ATTRIB */
+ 1165, /* GL_PROGRAM_LENGTH_ARB */
+ 1179, /* GL_PROGRAM_STRING_ARB */
+ 928, /* GL_MODELVIEW_PROJECTION_NV */
+ 569, /* GL_IDENTITY_NV */
+ 614, /* GL_INVERSE_NV */
+ 1623, /* GL_TRANSPOSE_NV */
+ 615, /* GL_INVERSE_TRANSPOSE_NV */
+ 837, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 836, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 745, /* GL_MATRIX0_NV */
+ 757, /* GL_MATRIX1_NV */
+ 769, /* GL_MATRIX2_NV */
+ 773, /* GL_MATRIX3_NV */
+ 775, /* GL_MATRIX4_NV */
+ 777, /* GL_MATRIX5_NV */
+ 779, /* GL_MATRIX6_NV */
+ 781, /* GL_MATRIX7_NV */
+ 285, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ 282, /* GL_CURRENT_MATRIX_ARB */
+ 1709, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 1712, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1177, /* GL_PROGRAM_PARAMETER_NV */
+ 1697, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1181, /* GL_PROGRAM_TARGET_NV */
+ 1178, /* GL_PROGRAM_RESIDENT_NV */
+ 1615, /* GL_TRACK_MATRIX_NV */
+ 1616, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 1707, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1159, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 319, /* GL_DEPTH_CLAMP_NV */
+ 1675, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1682, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1683, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1684, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1685, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1686, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1687, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1688, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1689, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1690, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1676, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1677, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1678, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1679, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1680, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1681, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 699, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 706, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 707, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 708, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 709, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 710, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 711, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 712, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 713, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 714, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 700, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 701, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 702, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 703, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 704, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 705, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 726, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 733, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 734, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 735, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 736, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 737, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 738, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1158, /* GL_PROGRAM_BINDING_ARB */
+ 740, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 741, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 727, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 728, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 729, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 730, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 731, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 732, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1538, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1535, /* GL_TEXTURE_COMPRESSED */
+ 967, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 239, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ 876, /* GL_MAX_VERTEX_UNITS_ARB */
+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ 1727, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1705, /* GL_VERTEX_BLEND_ARB */
+ 302, /* GL_CURRENT_WEIGHT_ARB */
+ 1726, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1725, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1724, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1723, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1720, /* GL_WEIGHT_ARRAY_ARB */
+ 345, /* GL_DOT3_RGB */
+ 346, /* GL_DOT3_RGBA */
+ 237, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ 232, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ 936, /* GL_MULTISAMPLE_3DFX */
+ 1306, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1297, /* GL_SAMPLES_3DFX */
+ 917, /* GL_MODELVIEW2_ARB */
+ 920, /* GL_MODELVIEW3_ARB */
+ 921, /* GL_MODELVIEW4_ARB */
+ 922, /* GL_MODELVIEW5_ARB */
+ 923, /* GL_MODELVIEW6_ARB */
+ 924, /* GL_MODELVIEW7_ARB */
+ 925, /* GL_MODELVIEW8_ARB */
+ 926, /* GL_MODELVIEW9_ARB */
+ 896, /* GL_MODELVIEW10_ARB */
+ 897, /* GL_MODELVIEW11_ARB */
+ 898, /* GL_MODELVIEW12_ARB */
+ 899, /* GL_MODELVIEW13_ARB */
+ 900, /* GL_MODELVIEW14_ARB */
+ 901, /* GL_MODELVIEW15_ARB */
+ 902, /* GL_MODELVIEW16_ARB */
+ 903, /* GL_MODELVIEW17_ARB */
+ 904, /* GL_MODELVIEW18_ARB */
+ 905, /* GL_MODELVIEW19_ARB */
+ 907, /* GL_MODELVIEW20_ARB */
+ 908, /* GL_MODELVIEW21_ARB */
+ 909, /* GL_MODELVIEW22_ARB */
+ 910, /* GL_MODELVIEW23_ARB */
+ 911, /* GL_MODELVIEW24_ARB */
+ 912, /* GL_MODELVIEW25_ARB */
+ 913, /* GL_MODELVIEW26_ARB */
+ 914, /* GL_MODELVIEW27_ARB */
+ 915, /* GL_MODELVIEW28_ARB */
+ 916, /* GL_MODELVIEW29_ARB */
+ 918, /* GL_MODELVIEW30_ARB */
+ 919, /* GL_MODELVIEW31_ARB */
+ 350, /* GL_DOT3_RGB_EXT */
+ 348, /* GL_DOT3_RGBA_EXT */
+ 890, /* GL_MIRROR_CLAMP_EXT */
+ 893, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 931, /* GL_MODULATE_ADD_ATI */
+ 932, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 933, /* GL_MODULATE_SUBTRACT_ATI */
+ 1733, /* GL_YCBCR_MESA */
+ 1022, /* GL_PACK_INVERT_MESA */
+ 305, /* GL_DEBUG_OBJECT_MESA */
+ 306, /* GL_DEBUG_PRINT_MESA */
+ 304, /* GL_DEBUG_ASSERT_MESA */
+ 107, /* GL_BUFFER_SIZE */
+ 109, /* GL_BUFFER_USAGE */
+ 1393, /* GL_STENCIL_BACK_FUNC */
+ 1392, /* GL_STENCIL_BACK_FAIL */
+ 1394, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1395, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 484, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1156, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1184, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1183, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1168, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1174, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1173, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 826, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 849, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 848, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 839, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 845, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 844, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 809, /* GL_MAX_DRAW_BUFFERS */
+ 354, /* GL_DRAW_BUFFER0 */
+ 357, /* GL_DRAW_BUFFER1 */
+ 378, /* GL_DRAW_BUFFER2 */
+ 381, /* GL_DRAW_BUFFER3 */
+ 384, /* GL_DRAW_BUFFER4 */
+ 387, /* GL_DRAW_BUFFER5 */
+ 390, /* GL_DRAW_BUFFER6 */
+ 393, /* GL_DRAW_BUFFER7 */
+ 396, /* GL_DRAW_BUFFER8 */
+ 399, /* GL_DRAW_BUFFER9 */
+ 358, /* GL_DRAW_BUFFER10 */
+ 361, /* GL_DRAW_BUFFER11 */
+ 364, /* GL_DRAW_BUFFER12 */
+ 367, /* GL_DRAW_BUFFER13 */
+ 370, /* GL_DRAW_BUFFER14 */
+ 373, /* GL_DRAW_BUFFER15 */
+ 82, /* GL_BLEND_EQUATION_ALPHA */
+ 790, /* GL_MATRIX_PALETTE_ARB */
+ 820, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 823, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 288, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ 784, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 283, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ 786, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 788, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 787, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 785, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1564, /* GL_TEXTURE_DEPTH_SIZE */
+ 338, /* GL_DEPTH_TEXTURE_MODE */
+ 1530, /* GL_TEXTURE_COMPARE_MODE */
+ 1528, /* GL_TEXTURE_COMPARE_FUNC */
+ 216, /* GL_COMPARE_R_TO_TEXTURE */
+ 1090, /* GL_POINT_SPRITE */
+ 265, /* GL_COORD_REPLACE */
+ 1094, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1209, /* GL_QUERY_COUNTER_BITS */
+ 290, /* GL_CURRENT_QUERY */
+ 1211, /* GL_QUERY_RESULT */
+ 1213, /* GL_QUERY_RESULT_AVAILABLE */
+ 870, /* GL_MAX_VERTEX_ATTRIBS */
+ 1695, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 336, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 335, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 856, /* GL_MAX_TEXTURE_COORDS */
+ 858, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1161, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1163, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1162, /* GL_PROGRAM_FORMAT_ARB */
+ 1609, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 317, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 316, /* GL_DEPTH_BOUNDS_EXT */
+ 52, /* GL_ARRAY_BUFFER */
+ 419, /* GL_ELEMENT_ARRAY_BUFFER */
+ 54, /* GL_ARRAY_BUFFER_BINDING */
+ 421, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 1669, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 957, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ 577, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1543, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 415, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1318, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 462, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 1721, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1691, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1164, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 832, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1170, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 841, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1182, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 847, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1172, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 843, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1176, /* GL_PROGRAM_PARAMETERS_ARB */
+ 846, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1171, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 842, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1157, /* GL_PROGRAM_ATTRIBS_ARB */
+ 827, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1169, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 840, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1155, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 825, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1167, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 838, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 833, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 829, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1185, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1620, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1221, /* GL_READ_ONLY */
+ 1729, /* GL_WRITE_ONLY */
+ 1223, /* GL_READ_WRITE */
+ 101, /* GL_BUFFER_ACCESS */
+ 103, /* GL_BUFFER_MAPPED */
+ 105, /* GL_BUFFER_MAP_POINTER */
+ 1614, /* GL_TIME_ELAPSED_EXT */
+ 744, /* GL_MATRIX0_ARB */
+ 756, /* GL_MATRIX1_ARB */
+ 768, /* GL_MATRIX2_ARB */
+ 772, /* GL_MATRIX3_ARB */
+ 774, /* GL_MATRIX4_ARB */
+ 776, /* GL_MATRIX5_ARB */
+ 778, /* GL_MATRIX6_ARB */
+ 780, /* GL_MATRIX7_ARB */
+ 782, /* GL_MATRIX8_ARB */
+ 783, /* GL_MATRIX9_ARB */
+ 746, /* GL_MATRIX10_ARB */
+ 747, /* GL_MATRIX11_ARB */
+ 748, /* GL_MATRIX12_ARB */
+ 749, /* GL_MATRIX13_ARB */
+ 750, /* GL_MATRIX14_ARB */
+ 751, /* GL_MATRIX15_ARB */
+ 752, /* GL_MATRIX16_ARB */
+ 753, /* GL_MATRIX17_ARB */
+ 754, /* GL_MATRIX18_ARB */
+ 755, /* GL_MATRIX19_ARB */
+ 758, /* GL_MATRIX20_ARB */
+ 759, /* GL_MATRIX21_ARB */
+ 760, /* GL_MATRIX22_ARB */
+ 761, /* GL_MATRIX23_ARB */
+ 762, /* GL_MATRIX24_ARB */
+ 763, /* GL_MATRIX25_ARB */
+ 764, /* GL_MATRIX26_ARB */
+ 765, /* GL_MATRIX27_ARB */
+ 766, /* GL_MATRIX28_ARB */
+ 767, /* GL_MATRIX29_ARB */
+ 770, /* GL_MATRIX30_ARB */
+ 771, /* GL_MATRIX31_ARB */
+ 1420, /* GL_STREAM_DRAW */
+ 1422, /* GL_STREAM_READ */
+ 1418, /* GL_STREAM_COPY */
+ 1386, /* GL_STATIC_DRAW */
+ 1388, /* GL_STATIC_READ */
+ 1384, /* GL_STATIC_COPY */
+ 409, /* GL_DYNAMIC_DRAW */
+ 411, /* GL_DYNAMIC_READ */
+ 407, /* GL_DYNAMIC_COPY */
+ 533, /* GL_GL_PIXEL_PACK_BUFFER */
+ 535, /* GL_GL_PIXEL_UNPACK_BUFFER */
+ 534, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
+ 536, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 830, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ 828, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 831, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 835, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 834, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 1414, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ 891, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1299, /* GL_SAMPLES_PASSED */
+ 485, /* GL_FRAGMENT_SHADER */
+ 1715, /* GL_VERTEX_SHADER */
+ 1175, /* GL_PROGRAM_OBJECT_ARB */
+ 1331, /* GL_SHADER_OBJECT_ARB */
+ 816, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 874, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 868, /* GL_MAX_VARYING_FLOATS */
+ 872, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 801, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 982, /* GL_OBJECT_TYPE_ARB */
+ 1333, /* GL_SHADER_TYPE */
+ 450, /* GL_FLOAT_VEC2 */
+ 452, /* GL_FLOAT_VEC3 */
+ 454, /* GL_FLOAT_VEC4 */
+ 604, /* GL_INT_VEC2 */
+ 606, /* GL_INT_VEC3 */
+ 608, /* GL_INT_VEC4 */
+ 93, /* GL_BOOL */
+ 95, /* GL_BOOL_VEC2 */
+ 97, /* GL_BOOL_VEC3 */
+ 99, /* GL_BOOL_VEC4 */
+ 444, /* GL_FLOAT_MAT2 */
+ 446, /* GL_FLOAT_MAT3 */
+ 448, /* GL_FLOAT_MAT4 */
+ 1290, /* GL_SAMPLER_1D */
+ 1292, /* GL_SAMPLER_2D */
+ 1294, /* GL_SAMPLER_3D */
+ 1295, /* GL_SAMPLER_CUBE */
+ 1291, /* GL_SAMPLER_1D_SHADOW */
+ 1293, /* GL_SAMPLER_2D_SHADOW */
+ 527, /* GL_GL_FLOAT_MAT2x3 */
+ 528, /* GL_GL_FLOAT_MAT2x4 */
+ 529, /* GL_GL_FLOAT_MAT3x2 */
+ 530, /* GL_GL_FLOAT_MAT3x4 */
+ 531, /* GL_GL_FLOAT_MAT4x2 */
+ 532, /* GL_GL_FLOAT_MAT4x3 */
+ 311, /* GL_DELETE_STATUS */
+ 220, /* GL_COMPILE_STATUS */
+ 657, /* GL_LINK_STATUS */
+ 1664, /* GL_VALIDATE_STATUS */
+ 589, /* GL_INFO_LOG_LENGTH */
+ 56, /* GL_ATTACHED_SHADERS */
+ 20, /* GL_ACTIVE_UNIFORMS */
+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ 1332, /* GL_SHADER_SOURCE_LENGTH */
+ 15, /* GL_ACTIVE_ATTRIBUTES */
+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
+ 487, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1335, /* GL_SHADING_LANGUAGE_VERSION */
+ 289, /* GL_CURRENT_PROGRAM */
+ 1031, /* GL_PALETTE4_RGB8_OES */
+ 1033, /* GL_PALETTE4_RGBA8_OES */
+ 1029, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1032, /* GL_PALETTE4_RGBA4_OES */
+ 1030, /* GL_PALETTE4_RGB5_A1_OES */
+ 1036, /* GL_PALETTE8_RGB8_OES */
+ 1038, /* GL_PALETTE8_RGBA8_OES */
+ 1034, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1037, /* GL_PALETTE8_RGBA4_OES */
+ 1035, /* GL_PALETTE8_RGB5_A1_OES */
+ 572, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 571, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 541, /* GL_GL_SRGB */
+ 542, /* GL_GL_SRGB8 */
+ 544, /* GL_GL_SRGB_ALPHA */
+ 543, /* GL_GL_SRGB8_ALPHA8 */
+ 540, /* GL_GL_SLUMINANCE_ALPHA */
+ 539, /* GL_GL_SLUMINANCE8_ALPHA8 */
+ 537, /* GL_GL_SLUMINANCE */
+ 538, /* GL_GL_SLUMINANCE8 */
+ 524, /* GL_GL_COMPRESSED_SRGB */
+ 525, /* GL_GL_COMPRESSED_SRGB_ALPHA */
+ 522, /* GL_GL_COMPRESSED_SLUMINANCE */
+ 523, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
+ 1092, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 665, /* GL_LOWER_LEFT */
+ 1661, /* GL_UPPER_LEFT */
+ 1396, /* GL_STENCIL_BACK_REF */
+ 1397, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1398, /* GL_STENCIL_BACK_WRITEMASK */
+ 402, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ 1235, /* GL_RENDERBUFFER_BINDING_EXT */
+ 1220, /* GL_READ_FRAMEBUFFER_EXT */
+ 403, /* GL_DRAW_FRAMEBUFFER_EXT */
+ 1219, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ 488, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ 494, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ 496, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 497, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ 504, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ 503, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 798, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
+ 313, /* GL_DEPTH_ATTACHMENT_EXT */
+ 1391, /* GL_STENCIL_ATTACHMENT_EXT */
+ 495, /* GL_FRAMEBUFFER_EXT */
+ 1236, /* GL_RENDERBUFFER_EXT */
+ 1239, /* GL_RENDERBUFFER_WIDTH_EXT */
+ 1237, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ 1238, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ 1409, /* GL_STENCIL_INDEX_EXT */
+ 1406, /* GL_STENCIL_INDEX1_EXT */
+ 1407, /* GL_STENCIL_INDEX4_EXT */
+ 1408, /* GL_STENCIL_INDEX8_EXT */
+ 1405, /* GL_STENCIL_INDEX16_EXT */
+ 427, /* GL_EVAL_BIT */
+ 1217, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 659, /* GL_LIST_BIT */
+ 1514, /* GL_TEXTURE_BIT */
+ 1314, /* GL_SCISSOR_BIT */
+ 29, /* GL_ALL_ATTRIB_BITS */
+ 938, /* GL_MULTISAMPLE_BIT */
};
#define Elements(x) sizeof(x)/sizeof(*x)
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5edf9a7dd65..135323f9c15 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -58,6 +58,7 @@ static const struct {
{ OFF, "GL_ARB_point_sprite", F(ARB_point_sprite) },
{ OFF, "GL_ARB_shader_objects", F(ARB_shader_objects) },
{ OFF, "GL_ARB_shading_language_100", F(ARB_shading_language_100) },
+ { OFF, "GL_ARB_shading_language_120", F(ARB_shading_language_120) },
{ OFF, "GL_ARB_shadow", F(ARB_shadow) },
{ OFF, "GL_ARB_shadow_ambient", F(SGIX_shadow_ambient) },
{ OFF, "GL_ARB_texture_border_clamp", F(ARB_texture_border_clamp) },
@@ -249,7 +250,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.EXT_secondary_color = GL_TRUE;
ctx->Extensions.EXT_shared_texture_palette = GL_TRUE;
ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
- ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
+ ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */
ctx->Extensions.EXT_texture_env_add = GL_TRUE;
ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
@@ -388,7 +389,7 @@ _mesa_enable_2_0_extensions(GLcontext *ctx)
#if FEATURE_ARB_shading_language_100
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
#endif
- ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* yes, turn it off */
+ ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */
#if FEATURE_ARB_vertex_shader
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
#endif
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index b6a59336cb8..cf8de1e0cbe 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -33,6 +33,7 @@
#include "fbobject.h"
#include "framebuffer.h"
#include "hash.h"
+#include "mipmap.h"
#include "renderbuffer.h"
#include "state.h"
#include "teximage.h"
@@ -570,6 +571,12 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
}
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* The above doesn't fully flush the drivers in the way that a
+ * glFlush does, but that is required here:
+ */
+ if (ctx->Driver.Flush)
+ ctx->Driver.Flush(ctx);
+
if (renderbuffer) {
newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
@@ -972,7 +979,9 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
}
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
-
+ if (ctx->Driver.Flush) {
+ ctx->Driver.Flush(ctx);
+ }
if (framebuffer) {
/* Binding a user-created framebuffer object */
newFb = _mesa_lookup_framebuffer(ctx, framebuffer);
@@ -1047,6 +1056,11 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* The above doesn't fully flush the drivers in the way that a
+ * glFlush does, but that is required here:
+ */
+ if (ctx->Driver.Flush)
+ ctx->Driver.Flush(ctx);
for (i = 0; i < n; i++) {
if (framebuffers[i] > 0) {
@@ -1262,6 +1276,11 @@ framebuffer_texture(GLuint dims, GLenum target, GLenum attachment,
}
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* The above doesn't fully flush the drivers in the way that a
+ * glFlush does, but that is required here:
+ */
+ if (ctx->Driver.Flush)
+ ctx->Driver.Flush(ctx);
_glthread_LOCK_MUTEX(fb->Mutex);
if (texObj) {
@@ -1380,6 +1399,11 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
}
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* The above doesn't fully flush the drivers in the way that a
+ * glFlush does, but that is required here:
+ */
+ if (ctx->Driver.Flush)
+ ctx->Driver.Flush(ctx);
assert(ctx->Driver.FramebufferRenderbuffer);
ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
@@ -1443,6 +1467,11 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
}
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* The above doesn't fully flush the drivers in the way that a
+ * glFlush does, but that is required here:
+ */
+ if (ctx->Driver.Flush)
+ ctx->Driver.Flush(ctx);
switch (pname) {
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
@@ -1521,7 +1550,9 @@ _mesa_GenerateMipmapEXT(GLenum target)
texObj = _mesa_select_tex_object(ctx, texUnit, target);
/* XXX this might not handle cube maps correctly */
+ _mesa_lock_texture(ctx, texObj);
_mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ _mesa_unlock_texture(ctx, texObj);
}
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index d0dbbbad02b..465197401b7 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -327,9 +327,14 @@ _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
fb->Width = width;
fb->Height = height;
- /* to update scissor / window bounds */
- if (ctx)
+ if (ctx) {
+ /* update scissor / window bounds */
_mesa_update_draw_buffer_bounds(ctx);
+ /* Signal new buffer state so that swrast will update its clipping
+ * info (the CLIP_BIT flag).
+ */
+ ctx->NewState |= _NEW_BUFFERS;
+ }
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 086785911ee..858c8226592 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -793,7 +793,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
break;
case GL_RED_BITS:
- params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.redBits);
break;
case GL_RED_SCALE:
params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
@@ -1833,6 +1833,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
case GL_STENCIL_BACK_VALUE_MASK:
params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
break;
+ case GL_STENCIL_BACK_WRITEMASK:
+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[1]);
+ break;
case GL_STENCIL_BACK_REF:
params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
break;
@@ -1863,7 +1866,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
+ params[0] = INT_TO_BOOLEAN(ctx->Const.FragmentProgram.MaxUniformComponents);
break;
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
@@ -1871,15 +1874,15 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxUniformComponents);
break;
case GL_MAX_VARYING_FLOATS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxVaryingFloats);
break;
case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxVertexTextureImageUnits);
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
@@ -2617,7 +2620,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ctx->Pixel.RedBias;
break;
case GL_RED_BITS:
- params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.redBits);
break;
case GL_RED_SCALE:
params[0] = ctx->Pixel.RedScale;
@@ -3657,6 +3660,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
case GL_STENCIL_BACK_VALUE_MASK:
params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
break;
+ case GL_STENCIL_BACK_WRITEMASK:
+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[1]);
+ break;
case GL_STENCIL_BACK_REF:
params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
break;
@@ -3687,7 +3693,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
- params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
+ params[0] = (GLfloat)(ctx->Const.FragmentProgram.MaxUniformComponents);
break;
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
@@ -3695,15 +3701,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxUniformComponents);
break;
case GL_MAX_VARYING_FLOATS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(MAX_VARYING_FLOATS);
+ params[0] = (GLfloat)(ctx->Const.MaxVaryingFloats);
break;
case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
+ params[0] = (GLfloat)(ctx->Const.MaxVertexTextureImageUnits);
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
@@ -4441,7 +4447,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = IROUND(ctx->Pixel.RedBias);
break;
case GL_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.redBits ;
+ params[0] = ctx->DrawBuffer->Visual.redBits;
break;
case GL_RED_SCALE:
params[0] = IROUND(ctx->Pixel.RedScale);
@@ -5481,6 +5487,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
case GL_STENCIL_BACK_VALUE_MASK:
params[0] = ctx->Stencil.ValueMask[1];
break;
+ case GL_STENCIL_BACK_WRITEMASK:
+ params[0] = ctx->Stencil.WriteMask[1];
+ break;
case GL_STENCIL_BACK_REF:
params[0] = ctx->Stencil.Ref[1];
break;
@@ -5511,7 +5520,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
- params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
+ params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
break;
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
@@ -5519,15 +5528,15 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
+ params[0] = ctx->Const.VertexProgram.MaxUniformComponents;
break;
case GL_MAX_VARYING_FLOATS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = MAX_VARYING_FLOATS;
+ params[0] = ctx->Const.MaxVaryingFloats;
break;
case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
+ params[0] = ctx->Const.MaxVertexTextureImageUnits;
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index fba8e1634f4..f033ddc8954 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -54,12 +54,16 @@ _mesa_GetString( GLenum name )
static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING;
static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING;
static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING;
- static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING;/*XXX FIX*/
+ static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING;
+ static const char *version_2_1 = "1.5 Mesa " MESA_VERSION_STRING;
#if FEATURE_ARB_shading_language_100
static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING;
#endif
+ if (!ctx)
+ return NULL;
+
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
/* this is a required driver function */
@@ -107,9 +111,18 @@ _mesa_GetString( GLenum name )
ctx->Extensions.EXT_shadow_funcs) {
if (ctx->Extensions.ARB_draw_buffers &&
ctx->Extensions.ARB_point_sprite &&
- ctx->Extensions.ARB_texture_non_power_of_two &&
- ctx->Extensions.EXT_stencil_two_side) {
- return (const GLubyte *) version_2_0;
+ ctx->Extensions.ARB_shader_objects &&
+ ctx->Extensions.ARB_vertex_shader &&
+ ctx->Extensions.ARB_fragment_shader &&
+ ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (ctx->Extensions.ARB_shading_language_120 &&
+ ctx->Extensions.EXT_pixel_buffer_object &&
+ ctx->Extensions.EXT_texture_sRGB) {
+ return (const GLubyte *) version_2_1;
+ }
+ else {
+ return (const GLubyte *) version_2_0;
+ }
}
else {
return (const GLubyte *) version_1_5;
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index 29aced0c7a7..6a7f09489c5 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -748,8 +748,8 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo
minmax[1][GCOMP] = CLAMP(ctx->MinMax.Max[GCOMP], 0.0F, 1.0F);
minmax[1][BCOMP] = CLAMP(ctx->MinMax.Max[BCOMP], 0.0F, 1.0F);
minmax[1][ACOMP] = CLAMP(ctx->MinMax.Max[ACOMP], 0.0F, 1.0F);
- _mesa_pack_rgba_span_float(ctx, 2, (CONST GLfloat (*)[4]) minmax,
- format, type, values, &ctx->Pack, 0);
+ _mesa_pack_rgba_span_float(ctx, 2, minmax,
+ format, type, values, &ctx->Pack, 0x0);
}
if (ctx->Pack.BufferObj->Name) {
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index d86c2203a81..695aab5227f 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -990,7 +990,7 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
* as indicated by the transferOps bitmask
*/
void
-_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLuint transferOps,
+_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
GLuint n, GLfloat rgba[][4])
{
/* scale & bias */
@@ -1059,45 +1059,130 @@ _mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLuint transferOps,
}
+/*
+ * Apply color index shift and offset to an array of pixels.
+ */
+static void
+shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] )
+{
+ GLint shift = ctx->Pixel.IndexShift;
+ GLint offset = ctx->Pixel.IndexOffset;
+ GLuint i;
+ if (shift > 0) {
+ for (i=0;i<n;i++) {
+ indexes[i] = (indexes[i] << shift) + offset;
+ }
+ }
+ else if (shift < 0) {
+ shift = -shift;
+ for (i=0;i<n;i++) {
+ indexes[i] = (indexes[i] >> shift) + offset;
+ }
+ }
+ else {
+ for (i=0;i<n;i++) {
+ indexes[i] = indexes[i] + offset;
+ }
+ }
+}
+
+
+
+/**
+ * Apply color index shift, offset and table lookup to an array
+ * of color indexes;
+ */
+void
+_mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps,
+ GLuint n, GLuint indexes[])
+{
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ shift_and_offset_ci(ctx, n, indexes);
+ }
+ if (transferOps & IMAGE_MAP_COLOR_BIT) {
+ const GLuint mask = ctx->Pixel.MapItoIsize - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ const GLuint j = indexes[i] & mask;
+ indexes[i] = IROUND(ctx->Pixel.MapItoI[j]);
+ }
+ }
+}
+
+
+/**
+ * Apply stencil index shift, offset and table lookup to an array
+ * of stencil values.
+ */
+void
+_mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n,
+ GLstencil stencil[])
+{
+ if (ctx->Pixel.IndexShift != 0 || ctx->Pixel.IndexOffset != 0) {
+ const GLint offset = ctx->Pixel.IndexOffset;
+ GLint shift = ctx->Pixel.IndexShift;
+ GLuint i;
+ if (shift > 0) {
+ for (i = 0; i < n; i++) {
+ stencil[i] = (stencil[i] << shift) + offset;
+ }
+ }
+ else if (shift < 0) {
+ shift = -shift;
+ for (i = 0; i < n; i++) {
+ stencil[i] = (stencil[i] >> shift) + offset;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ stencil[i] = stencil[i] + offset;
+ }
+ }
+ }
+ if (ctx->Pixel.MapStencilFlag) {
+ GLuint mask = ctx->Pixel.MapStoSsize - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ stencil[i] = ctx->Pixel.MapStoS[ stencil[i] & mask ];
+ }
+ }
+}
+
/**
* Used to pack an array [][4] of RGBA float colors as specified
* by the dstFormat, dstType and dstPacking. Used by glReadPixels,
* glGetConvolutionFilter(), etc.
- * NOTE: it's assumed the incoming float colors are all in [0,1].
+ * Incoming colors will be clamped to [0,1] if needed.
+ * Note: the rgba values will be modified by this function when any pixel
+ * transfer ops are enabled.
*/
void
-_mesa_pack_rgba_span_float( GLcontext *ctx,
- GLuint n, CONST GLfloat rgbaIn[][4],
- GLenum dstFormat, GLenum dstType,
- GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLuint transferOps )
+_mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4],
+ GLenum dstFormat, GLenum dstType,
+ GLvoid *dstAddr,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps)
{
- const GLint comps = _mesa_components_in_format(dstFormat);
GLfloat luminance[MAX_WIDTH];
- const GLfloat (*rgba)[4];
+ const GLint comps = _mesa_components_in_format(dstFormat);
GLuint i;
- if (transferOps) {
- /* make copy of incoming data */
- GLfloat rgbaCopy[MAX_WIDTH][4];
- _mesa_memcpy(rgbaCopy, rgbaIn, n * 4 * sizeof(GLfloat));
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgbaCopy);
- rgba = (const GLfloat (*)[4]) rgbaCopy;
+ if (dstType != GL_FLOAT) {
+ /* need to clamp to [0, 1] */
+ transferOps |= IMAGE_CLAMP_BIT;
+ }
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
if ((transferOps & IMAGE_MIN_MAX_BIT) && ctx->MinMax.Sink) {
return;
}
}
- else {
- /* use incoming data, not a copy */
- rgba = (const GLfloat (*)[4]) rgbaIn;
- }
if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
/* compute luminance values */
- if (ctx->Color.ClampReadColor == GL_TRUE) {
+ if (ctx->Color.ClampReadColor == GL_TRUE || dstType != GL_FLOAT) {
for (i = 0; i < n; i++) {
GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
luminance[i] = CLAMP(sum, 0.0F, 1.0F);
@@ -1992,78 +2077,6 @@ _mesa_pack_rgba_span_float( GLcontext *ctx,
}
-/*
- * Pack the given RGBA span into client memory at 'dest' address
- * in the given pixel format and type.
- * Optionally apply the enabled pixel transfer ops.
- * Pack into memory using the given packing params struct.
- * This is used by glReadPixels and glGetTexImage?D()
- * \param ctx - the context
- * n - number of pixels in the span
- * rgba - the pixels
- * format - dest packing format
- * type - dest packing data type
- * destination - destination packing address
- * packing - pixel packing parameters
- * transferOps - bitmask of IMAGE_*_BIT operations to apply
- */
-void
-_mesa_pack_rgba_span_chan( GLcontext *ctx,
- GLuint n, CONST GLchan srcRgba[][4],
- GLenum dstFormat, GLenum dstType,
- GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLuint transferOps)
-{
- ASSERT((ctx->NewState & _NEW_PIXEL) == 0 || transferOps == 0);
-
- /* Test for optimized case first */
- if (transferOps == 0 && dstFormat == GL_RGBA && dstType == CHAN_TYPE) {
- /* common simple case */
- _mesa_memcpy(dstAddr, srcRgba, n * 4 * sizeof(GLchan));
- }
- else if (transferOps == 0 && dstFormat == GL_RGB && dstType == CHAN_TYPE) {
- /* common simple case */
- GLuint i;
- GLchan *dest = (GLchan *) dstAddr;
- for (i = 0; i < n; i++) {
- dest[0] = srcRgba[i][RCOMP];
- dest[1] = srcRgba[i][GCOMP];
- dest[2] = srcRgba[i][BCOMP];
- dest += 3;
- }
- }
- else if (transferOps == 0 && dstFormat == GL_RGBA && dstType == GL_UNSIGNED_BYTE) {
- /* common simple case */
- GLuint i;
- GLubyte *dest = (GLubyte *) dstAddr;
- for (i = 0; i < n; i++) {
- dest[0] = CHAN_TO_UBYTE(srcRgba[i][RCOMP]);
- dest[1] = CHAN_TO_UBYTE(srcRgba[i][GCOMP]);
- dest[2] = CHAN_TO_UBYTE(srcRgba[i][BCOMP]);
- dest[3] = CHAN_TO_UBYTE(srcRgba[i][ACOMP]);
- dest += 4;
- }
- }
- else {
- /* general solution */
- GLuint i;
- GLfloat rgba[MAX_WIDTH][4];
- assert(n <= MAX_WIDTH);
- /* convert color components to floating point */
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = CHAN_TO_FLOAT(srcRgba[i][RCOMP]);
- rgba[i][GCOMP] = CHAN_TO_FLOAT(srcRgba[i][GCOMP]);
- rgba[i][BCOMP] = CHAN_TO_FLOAT(srcRgba[i][BCOMP]);
- rgba[i][ACOMP] = CHAN_TO_FLOAT(srcRgba[i][ACOMP]);
- }
- _mesa_pack_rgba_span_float(ctx, n, (const GLfloat (*)[4]) rgba,
- dstFormat, dstType, dstAddr,
- dstPacking, transferOps);
- }
-}
-
-
#define SWAP2BYTE(VALUE) \
{ \
GLubyte *bytes = (GLubyte *) &(VALUE); \
@@ -2089,7 +2102,7 @@ extract_uint_indexes(GLuint n, GLuint indexes[],
GLenum srcFormat, GLenum srcType, const GLvoid *src,
const struct gl_pixelstore_attrib *unpack )
{
- assert(srcFormat == GL_COLOR_INDEX);
+ ASSERT(srcFormat == GL_COLOR_INDEX || srcFormat == GL_STENCIL_INDEX);
ASSERT(srcType == GL_BITMAP ||
srcType == GL_UNSIGNED_BYTE ||
@@ -2820,7 +2833,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
GLenum srcFormat, GLenum srcType,
const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps )
+ GLbitfield transferOps )
{
ASSERT(dstFormat == GL_ALPHA ||
dstFormat == GL_LUMINANCE ||
@@ -3002,17 +3015,10 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
extract_uint_indexes(n, indexes, srcFormat, srcType, source,
srcPacking);
- if (dstFormat == GL_COLOR_INDEX
- && (transferOps & IMAGE_MAP_COLOR_BIT)) {
- _mesa_map_ci(ctx, n, indexes);
- }
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- _mesa_shift_and_offset_ci(ctx, n, indexes);
- }
-
if (dstFormat == GL_COLOR_INDEX) {
- /* convert to GLchan and return */
GLuint i;
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ /* convert to GLchan and return */
for (i = 0; i < n; i++) {
dest[i] = (GLchan) (indexes[i] & 0xff);
}
@@ -3020,6 +3026,9 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
}
else {
/* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ shift_and_offset_ci(ctx, n, indexes);
+ }
_mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
}
@@ -3160,7 +3169,7 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
GLenum srcFormat, GLenum srcType,
const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps )
+ GLbitfield transferOps )
{
ASSERT(dstFormat == GL_ALPHA ||
dstFormat == GL_LUMINANCE ||
@@ -3226,17 +3235,10 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
extract_uint_indexes(n, indexes, srcFormat, srcType, source,
srcPacking);
- if (dstFormat == GL_COLOR_INDEX
- && (transferOps & IMAGE_MAP_COLOR_BIT)) {
- _mesa_map_ci(ctx, n, indexes);
- }
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- _mesa_shift_and_offset_ci(ctx, n, indexes);
- }
-
if (dstFormat == GL_COLOR_INDEX) {
- /* convert to GLchan and return */
GLuint i;
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ /* convert to GLchan and return */
for (i = 0; i < n; i++) {
dest[i] = (GLchan) (indexes[i] & 0xff);
}
@@ -3244,6 +3246,9 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
}
else {
/* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ shift_and_offset_ci(ctx, n, indexes);
+ }
_mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
}
@@ -3386,7 +3391,7 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest,
GLenum srcType, const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps )
+ GLbitfield transferOps )
{
ASSERT(srcType == GL_BITMAP ||
srcType == GL_UNSIGNED_BYTE ||
@@ -3426,14 +3431,8 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source,
srcPacking);
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- /* shift and offset indexes */
- _mesa_shift_and_offset_ci(ctx, n, indexes);
- }
- if (transferOps & IMAGE_MAP_COLOR_BIT) {
- /* Apply lookup table */
- _mesa_map_ci(ctx, n, indexes);
- }
+ if (transferOps)
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
/* convert to dest type */
switch (dstType) {
@@ -3469,7 +3468,7 @@ void
_mesa_pack_index_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest, const GLuint *source,
const struct gl_pixelstore_attrib *dstPacking,
- GLuint transferOps )
+ GLbitfield transferOps )
{
GLuint indexes[MAX_WIDTH];
@@ -3480,12 +3479,7 @@ _mesa_pack_index_span( const GLcontext *ctx, GLuint n,
if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) {
/* make a copy of input */
_mesa_memcpy(indexes, source, n * sizeof(GLuint));
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- _mesa_shift_and_offset_ci( ctx, n, indexes);
- }
- if (transferOps & IMAGE_MAP_COLOR_BIT) {
- _mesa_map_ci(ctx, n, indexes);
- }
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
source = indexes;
}
@@ -3605,7 +3599,7 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest,
GLenum srcType, const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps )
+ GLbitfield transferOps )
{
ASSERT(srcType == GL_BITMAP ||
srcType == GL_UNSIGNED_BYTE ||
@@ -3646,13 +3640,13 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
GLuint indexes[MAX_WIDTH];
assert(n <= MAX_WIDTH);
- extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source,
+ extract_uint_indexes(n, indexes, GL_STENCIL_INDEX, srcType, source,
srcPacking);
if (transferOps) {
if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
/* shift and offset indexes */
- _mesa_shift_and_offset_ci(ctx, n, indexes);
+ shift_and_offset_ci(ctx, n, indexes);
}
if (ctx->Pixel.MapStencilFlag) {
@@ -3708,12 +3702,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
ctx->Pixel.MapStencilFlag) {
/* make a copy of input */
_mesa_memcpy(stencil, source, n * sizeof(GLstencil));
- if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset) {
- _mesa_shift_and_offset_stencil( ctx, n, stencil );
- }
- if (ctx->Pixel.MapStencilFlag) {
- _mesa_map_stencil( ctx, n, stencil );
- }
+ _mesa_apply_stencil_transfer_ops(ctx, n, stencil);
source = stencil;
}
@@ -4142,15 +4131,11 @@ _mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest,
depthVals = depthCopy;
}
- if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset) {
+ if (ctx->Pixel.IndexShift ||
+ ctx->Pixel.IndexOffset ||
+ ctx->Pixel.MapStencilFlag) {
_mesa_memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil));
- _mesa_shift_and_offset_stencil(ctx, n, stencilCopy);
- stencilVals = stencilCopy;
- }
- if (ctx->Pixel.MapStencilFlag) {
- if (stencilVals != stencilCopy)
- _mesa_memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil));
- _mesa_map_stencil(ctx, n, stencilCopy);
+ _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy);
stencilVals = stencilCopy;
}
@@ -4243,11 +4228,136 @@ _mesa_unpack_image( GLuint dimensions,
#endif /* _HAVE_FULL_GL */
+
/**
- * Perform clipping for glDrawPixels. The image's window position
- * and size, and the unpack SkipPixels and SkipRows are adjusted so
- * that the image region is entirely within the window and scissor bounds.
- * NOTE: this will only work when glPixelZoom is (1, 1).
+ * Convert an array of RGBA colors from one datatype to another.
+ * NOTE: src may equal dst. In that case, we use a temporary buffer.
+ */
+void
+_mesa_convert_colors(GLenum srcType, const GLvoid *src,
+ GLenum dstType, GLvoid *dst,
+ GLuint count, const GLubyte mask[])
+{
+ GLuint tempBuffer[MAX_WIDTH][4];
+ const GLboolean useTemp = (src == dst);
+
+ ASSERT(srcType != dstType);
+
+ switch (srcType) {
+ case GL_UNSIGNED_BYTE:
+ if (dstType == GL_UNSIGNED_SHORT) {
+ const GLubyte (*src1)[4] = (const GLubyte (*)[4]) src;
+ GLushort (*dst2)[4] = (GLushort (*)[4]) (useTemp ? tempBuffer : dst);
+ GLuint i;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst2[i][RCOMP] = UBYTE_TO_USHORT(src1[i][RCOMP]);
+ dst2[i][GCOMP] = UBYTE_TO_USHORT(src1[i][GCOMP]);
+ dst2[i][BCOMP] = UBYTE_TO_USHORT(src1[i][BCOMP]);
+ dst2[i][ACOMP] = UBYTE_TO_USHORT(src1[i][ACOMP]);
+ }
+ }
+ if (useTemp)
+ _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort));
+ }
+ else {
+ const GLubyte (*src1)[4] = (const GLubyte (*)[4]) src;
+ GLfloat (*dst4)[4] = (GLfloat (*)[4]) (useTemp ? tempBuffer : dst);
+ GLuint i;
+ ASSERT(dstType == GL_FLOAT);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst4[i][RCOMP] = UBYTE_TO_FLOAT(src1[i][RCOMP]);
+ dst4[i][GCOMP] = UBYTE_TO_FLOAT(src1[i][GCOMP]);
+ dst4[i][BCOMP] = UBYTE_TO_FLOAT(src1[i][BCOMP]);
+ dst4[i][ACOMP] = UBYTE_TO_FLOAT(src1[i][ACOMP]);
+ }
+ }
+ if (useTemp)
+ _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat));
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ if (dstType == GL_UNSIGNED_BYTE) {
+ const GLushort (*src2)[4] = (const GLushort (*)[4]) src;
+ GLubyte (*dst1)[4] = (GLubyte (*)[4]) (useTemp ? tempBuffer : dst);
+ GLuint i;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst1[i][RCOMP] = USHORT_TO_UBYTE(src2[i][RCOMP]);
+ dst1[i][GCOMP] = USHORT_TO_UBYTE(src2[i][GCOMP]);
+ dst1[i][BCOMP] = USHORT_TO_UBYTE(src2[i][BCOMP]);
+ dst1[i][ACOMP] = USHORT_TO_UBYTE(src2[i][ACOMP]);
+ }
+ }
+ if (useTemp)
+ _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte));
+ }
+ else {
+ const GLushort (*src2)[4] = (const GLushort (*)[4]) src;
+ GLfloat (*dst4)[4] = (GLfloat (*)[4]) (useTemp ? tempBuffer : dst);
+ GLuint i;
+ ASSERT(dstType == GL_FLOAT);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst4[i][RCOMP] = USHORT_TO_FLOAT(src2[i][RCOMP]);
+ dst4[i][GCOMP] = USHORT_TO_FLOAT(src2[i][GCOMP]);
+ dst4[i][BCOMP] = USHORT_TO_FLOAT(src2[i][BCOMP]);
+ dst4[i][ACOMP] = USHORT_TO_FLOAT(src2[i][ACOMP]);
+ }
+ }
+ if (useTemp)
+ _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat));
+ }
+ break;
+ case GL_FLOAT:
+ if (dstType == GL_UNSIGNED_BYTE) {
+ const GLfloat (*src4)[4] = (const GLfloat (*)[4]) src;
+ GLubyte (*dst1)[4] = (GLubyte (*)[4]) (useTemp ? tempBuffer : dst);
+ GLuint i;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ UNCLAMPED_FLOAT_TO_UBYTE(dst1[i][RCOMP], src4[i][RCOMP]);
+ UNCLAMPED_FLOAT_TO_UBYTE(dst1[i][GCOMP], src4[i][GCOMP]);
+ UNCLAMPED_FLOAT_TO_UBYTE(dst1[i][BCOMP], src4[i][BCOMP]);
+ UNCLAMPED_FLOAT_TO_UBYTE(dst1[i][ACOMP], src4[i][ACOMP]);
+ }
+ }
+ if (useTemp)
+ _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte));
+ }
+ else {
+ const GLfloat (*src4)[4] = (const GLfloat (*)[4]) src;
+ GLushort (*dst2)[4] = (GLushort (*)[4]) (useTemp ? tempBuffer : dst);
+ GLuint i;
+ ASSERT(dstType == GL_UNSIGNED_SHORT);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ UNCLAMPED_FLOAT_TO_USHORT(dst2[i][RCOMP], src4[i][RCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(dst2[i][GCOMP], src4[i][GCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(dst2[i][BCOMP], src4[i][BCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(dst2[i][ACOMP], src4[i][ACOMP]);
+ }
+ }
+ if (useTemp)
+ _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort));
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "Invalid datatype in _mesa_convert_colors");
+ }
+}
+
+
+
+
+/**
+ * Perform basic clipping for glDrawPixels. The image's position and size
+ * and the unpack SkipPixels and SkipRows are adjusted so that the image
+ * region is entirely within the window and scissor bounds.
+ * NOTE: this will only work when glPixelZoom is (1, 1) or (1, -1).
+ * If Pixel.ZoomY is -1, *destY will be changed to be the first row which
+ * we'll actually write. Beforehand, *destY-1 is the first drawing row.
*
* \return GL_TRUE if image is ready for drawing or
* GL_FALSE if image was completely clipped away (draw nothing)
@@ -4264,7 +4374,8 @@ _mesa_clip_drawpixels(const GLcontext *ctx,
unpack->RowLength = *width;
}
- ASSERT(ctx->Pixel.ZoomX == 1.0F && ctx->Pixel.ZoomY == 1.0F);
+ ASSERT(ctx->Pixel.ZoomX == 1.0F);
+ ASSERT(ctx->Pixel.ZoomY == 1.0F || ctx->Pixel.ZoomY == -1.0F);
/* left clipping */
if (*destX < buffer->_Xmin) {
@@ -4279,15 +4390,30 @@ _mesa_clip_drawpixels(const GLcontext *ctx,
if (*width <= 0)
return GL_FALSE;
- /* bottom clipping */
- if (*destY < buffer->_Ymin) {
- unpack->SkipRows += (buffer->_Ymin - *destY);
- *height -= (buffer->_Ymin - *destY);
- *destY = buffer->_Ymin;
+ if (ctx->Pixel.ZoomY == 1.0F) {
+ /* bottom clipping */
+ if (*destY < buffer->_Ymin) {
+ unpack->SkipRows += (buffer->_Ymin - *destY);
+ *height -= (buffer->_Ymin - *destY);
+ *destY = buffer->_Ymin;
+ }
+ /* top clipping */
+ if (*destY + *height > buffer->_Ymax)
+ *height -= (*destY + *height - buffer->_Ymax);
+ }
+ else { /* upside down */
+ /* top clipping */
+ if (*destY > buffer->_Ymax) {
+ unpack->SkipRows += (*destY - buffer->_Ymax);
+ *height -= (*destY - buffer->_Ymax);
+ *destY = buffer->_Ymax;
+ }
+ /* bottom clipping */
+ if (*destY - *height < buffer->_Ymin)
+ *height -= (buffer->_Ymin - (*destY - *height));
+ /* adjust destY so it's the first row to write to */
+ (*destY)--;
}
- /* top clipping */
- if (*destY + *height > buffer->_Ymax)
- *height -= (*destY + *height - buffer->_Ymax);
if (*height <= 0)
return GL_TRUE;
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index 84faa03255e..990398a7c45 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -112,23 +112,25 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
extern void
-_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLuint transferOps,
+_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
GLuint n, GLfloat rgba[][4]);
+
extern void
-_mesa_pack_rgba_span_float( GLcontext *ctx,
- GLuint n, CONST GLfloat rgba[][4],
- GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLuint transferOps );
+_mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps,
+ GLuint n, GLuint indexes[]);
extern void
-_mesa_pack_rgba_span_chan( GLcontext *ctx,
- GLuint n, CONST GLchan rgba[][4],
- GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLuint transferOps );
+_mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n,
+ GLstencil stencil[]);
+
+
+extern void
+_mesa_pack_rgba_span_float( GLcontext *ctx, GLuint n, GLfloat rgba[][4],
+ GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps );
extern void
@@ -137,7 +139,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
GLenum srcFormat, GLenum srcType,
const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps );
+ GLbitfield transferOps );
extern void
@@ -146,7 +148,7 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
GLenum srcFormat, GLenum srcType,
const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps );
+ GLbitfield transferOps );
extern void
@@ -154,14 +156,14 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest,
GLenum srcType, const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps );
+ GLbitfield transferOps );
extern void
_mesa_pack_index_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest, const GLuint *source,
const struct gl_pixelstore_attrib *dstPacking,
- GLuint transferOps );
+ GLbitfield transferOps );
extern void
@@ -169,7 +171,7 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest,
GLenum srcType, const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking,
- GLuint transferOps );
+ GLbitfield transferOps );
extern void
_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
@@ -203,6 +205,12 @@ _mesa_unpack_image( GLuint dimensions,
const struct gl_pixelstore_attrib *unpack );
+extern void
+_mesa_convert_colors(GLenum srcType, const GLvoid *src,
+ GLenum dstType, GLvoid *dst,
+ GLuint count, const GLubyte mask[]);
+
+
extern GLboolean
_mesa_clip_drawpixels(const GLcontext *ctx,
GLint *destX, GLint *destY,
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index a17a0fd18ca..9fb02a7e9cd 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -604,6 +604,17 @@ do { \
#endif
+/**
+ * Return 1 if this is a little endian machine, 0 if big endian.
+ */
+static INLINE GLboolean
+_mesa_little_endian(void)
+{
+ const GLuint ui = 1; /* intentionally not static */
+ return *((const GLubyte *) &ui);
+}
+
+
/**********************************************************************
* Functions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 63f88b7229f..984f7b2abc4 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1340,6 +1340,7 @@ _mesa_init_lighting( GLcontext *ctx )
NULL );
ctx->Light.ColorMaterialEnabled = GL_FALSE;
+ ctx->Light.ClampVertexColor = GL_TRUE;
/* Lighting miscellaneous */
ctx->_ShineTabList = MALLOC_STRUCT( gl_shine_tab );
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 672a2f8bd2f..fbbcd4e269e 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -511,7 +511,18 @@ do { \
(DST)[1] += S; \
} while (0)
+/** Assign scalers to short vectors */
+#define ASSIGN_2V( V, V0, V1 ) \
+do { \
+ V[0] = V0; \
+ V[1] = V1; \
+} while(0)
+
+/*@}*/
+
+/** \name Linear interpolation macros */
+/*@{*/
/**
* Linear interpolation
@@ -585,15 +596,6 @@ do { \
} \
} while(0)
-
-
-/** Assign scalers to short vectors */
-#define ASSIGN_2V( V, V0, V1 ) \
-do { \
- V[0] = V0; \
- V[1] = V1; \
-} while(0)
-
/*@}*/
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
new file mode 100644
index 00000000000..f154bd46513
--- /dev/null
+++ b/src/mesa/main/mipmap.c
@@ -0,0 +1,1147 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.2
+ *
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file mipmap.c mipmap generation and teximage resizing functions.
+ */
+
+#include "imports.h"
+#include "mipmap.h"
+#include "texcompress.h"
+#include "texformat.h"
+#include "teximage.h"
+#include "image.h"
+
+
+
+/**
+ * Average together two rows of a source image to produce a single new
+ * row in the dest image. It's legal for the two source rows to point
+ * to the same data. The source width must be equal to either the
+ * dest width or two times the dest width.
+ */
+static void
+do_row(const struct gl_texture_format *format, GLint srcWidth,
+ const GLvoid *srcRowA, const GLvoid *srcRowB,
+ GLint dstWidth, GLvoid *dstRow)
+{
+ const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1;
+ const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2;
+
+ /* This assertion is no longer valid with non-power-of-2 textures
+ assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth);
+ */
+
+ switch (format->MesaFormat) {
+ case MESA_FORMAT_RGBA:
+ {
+ GLuint i, j, k;
+ const GLchan (*rowA)[4] = (const GLchan (*)[4]) srcRowA;
+ const GLchan (*rowB)[4] = (const GLchan (*)[4]) srcRowB;
+ GLchan (*dst)[4] = (GLchan (*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) / 4;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] +
+ rowB[j][3] + rowB[k][3]) / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGB:
+ {
+ GLuint i, j, k;
+ const GLchan (*rowA)[3] = (const GLchan (*)[3]) srcRowA;
+ const GLchan (*rowB)[3] = (const GLchan (*)[3]) srcRowB;
+ GLchan (*dst)[3] = (GLchan (*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_ALPHA:
+ case MESA_FORMAT_LUMINANCE:
+ case MESA_FORMAT_INTENSITY:
+ {
+ GLuint i, j, k;
+ const GLchan *rowA = (const GLchan *) srcRowA;
+ const GLchan *rowB = (const GLchan *) srcRowB;
+ GLchan *dst = (GLchan *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA:
+ {
+ GLuint i, j, k;
+ const GLchan (*rowA)[2] = (const GLchan (*)[2]) srcRowA;
+ const GLchan (*rowB)[2] = (const GLchan (*)[2]) srcRowB;
+ GLchan (*dst)[2] = (GLchan (*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_Z32:
+ {
+ GLuint i, j, k;
+ const GLuint *rowA = (const GLuint *) srcRowA;
+ const GLuint *rowB = (const GLuint *) srcRowB;
+ GLfloat *dst = (GLfloat *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_Z16:
+ {
+ GLuint i, j, k;
+ const GLushort *rowA = (const GLushort *) srcRowA;
+ const GLushort *rowB = (const GLushort *) srcRowB;
+ GLushort *dst = (GLushort *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
+ }
+ }
+ return;
+ /* Begin hardware formats */
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_REV:
+#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SRGBA8:
+#endif
+ {
+ GLuint i, j, k;
+ const GLubyte (*rowA)[4] = (const GLubyte (*)[4]) srcRowA;
+ const GLubyte (*rowB)[4] = (const GLubyte (*)[4]) srcRowB;
+ GLubyte (*dst)[4] = (GLubyte (*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) / 4;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] +
+ rowB[j][3] + rowB[k][3]) / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR888:
+#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SRGB8:
+#endif
+ {
+ GLuint i, j, k;
+ const GLubyte (*rowA)[3] = (const GLubyte (*)[3]) srcRowA;
+ const GLubyte (*rowB)[3] = (const GLubyte (*)[3]) srcRowB;
+ GLubyte (*dst)[3] = (GLubyte (*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) / 4;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_REV:
+ {
+ GLuint i, j, k;
+ const GLushort *rowA = (const GLushort *) srcRowA;
+ const GLushort *rowB = (const GLushort *) srcRowB;
+ GLushort *dst = (GLushort *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = rowA[j] & 0x1f;
+ const GLint rowAr1 = rowA[k] & 0x1f;
+ const GLint rowBr0 = rowB[j] & 0x1f;
+ const GLint rowBr1 = rowB[k] & 0x1f;
+ const GLint rowAg0 = (rowA[j] >> 5) & 0x3f;
+ const GLint rowAg1 = (rowA[k] >> 5) & 0x3f;
+ const GLint rowBg0 = (rowB[j] >> 5) & 0x3f;
+ const GLint rowBg1 = (rowB[k] >> 5) & 0x3f;
+ const GLint rowAb0 = (rowA[j] >> 11) & 0x1f;
+ const GLint rowAb1 = (rowA[k] >> 11) & 0x1f;
+ const GLint rowBb0 = (rowB[j] >> 11) & 0x1f;
+ const GLint rowBb1 = (rowB[k] >> 11) & 0x1f;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ dst[i] = (blue << 11) | (green << 5) | red;
+ }
+ }
+ return;
+ case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_REV:
+ {
+ GLuint i, j, k;
+ const GLushort *rowA = (const GLushort *) srcRowA;
+ const GLushort *rowB = (const GLushort *) srcRowB;
+ GLushort *dst = (GLushort *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = rowA[j] & 0xf;
+ const GLint rowAr1 = rowA[k] & 0xf;
+ const GLint rowBr0 = rowB[j] & 0xf;
+ const GLint rowBr1 = rowB[k] & 0xf;
+ const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
+ const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
+ const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
+ const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
+ const GLint rowAb0 = (rowA[j] >> 8) & 0xf;
+ const GLint rowAb1 = (rowA[k] >> 8) & 0xf;
+ const GLint rowBb0 = (rowB[j] >> 8) & 0xf;
+ const GLint rowBb1 = (rowB[k] >> 8) & 0xf;
+ const GLint rowAa0 = (rowA[j] >> 12) & 0xf;
+ const GLint rowAa1 = (rowA[k] >> 12) & 0xf;
+ const GLint rowBa0 = (rowB[j] >> 12) & 0xf;
+ const GLint rowBa1 = (rowB[k] >> 12) & 0xf;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
+ dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red;
+ }
+ }
+ return;
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_REV: /* XXX broken? */
+ {
+ GLuint i, j, k;
+ const GLushort *rowA = (const GLushort *) srcRowA;
+ const GLushort *rowB = (const GLushort *) srcRowB;
+ GLushort *dst = (GLushort *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = rowA[j] & 0x1f;
+ const GLint rowAr1 = rowA[k] & 0x1f;
+ const GLint rowBr0 = rowB[j] & 0x1f;
+ const GLint rowBr1 = rowB[k] & 0xf;
+ const GLint rowAg0 = (rowA[j] >> 5) & 0x1f;
+ const GLint rowAg1 = (rowA[k] >> 5) & 0x1f;
+ const GLint rowBg0 = (rowB[j] >> 5) & 0x1f;
+ const GLint rowBg1 = (rowB[k] >> 5) & 0x1f;
+ const GLint rowAb0 = (rowA[j] >> 10) & 0x1f;
+ const GLint rowAb1 = (rowA[k] >> 10) & 0x1f;
+ const GLint rowBb0 = (rowB[j] >> 10) & 0x1f;
+ const GLint rowBb1 = (rowB[k] >> 10) & 0x1f;
+ const GLint rowAa0 = (rowA[j] >> 15) & 0x1;
+ const GLint rowAa1 = (rowA[k] >> 15) & 0x1;
+ const GLint rowBa0 = (rowB[j] >> 15) & 0x1;
+ const GLint rowBa1 = (rowB[k] >> 15) & 0x1;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
+ dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red;
+ }
+ }
+ return;
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_REV:
+#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SLA8:
+#endif
+ {
+ GLuint i, j, k;
+ const GLubyte (*rowA)[2] = (const GLubyte (*)[2]) srcRowA;
+ const GLubyte (*rowB)[2] = (const GLubyte (*)[2]) srcRowB;
+ GLubyte (*dst)[2] = (GLubyte (*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) >> 2;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) >> 2;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGB332:
+ {
+ GLuint i, j, k;
+ const GLubyte *rowA = (const GLubyte *) srcRowA;
+ const GLubyte *rowB = (const GLubyte *) srcRowB;
+ GLubyte *dst = (GLubyte *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = rowA[j] & 0x3;
+ const GLint rowAr1 = rowA[k] & 0x3;
+ const GLint rowBr0 = rowB[j] & 0x3;
+ const GLint rowBr1 = rowB[k] & 0x3;
+ const GLint rowAg0 = (rowA[j] >> 2) & 0x7;
+ const GLint rowAg1 = (rowA[k] >> 2) & 0x7;
+ const GLint rowBg0 = (rowB[j] >> 2) & 0x7;
+ const GLint rowBg1 = (rowB[k] >> 2) & 0x7;
+ const GLint rowAb0 = (rowA[j] >> 5) & 0x7;
+ const GLint rowAb1 = (rowA[k] >> 5) & 0x7;
+ const GLint rowBb0 = (rowB[j] >> 5) & 0x7;
+ const GLint rowBb1 = (rowB[k] >> 5) & 0x7;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ dst[i] = (blue << 5) | (green << 2) | red;
+ }
+ }
+ return;
+ case MESA_FORMAT_A8:
+ case MESA_FORMAT_L8:
+ case MESA_FORMAT_I8:
+ case MESA_FORMAT_CI8:
+#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SL8:
+#endif
+ {
+ GLuint i, j, k;
+ const GLubyte *rowA = (const GLubyte *) srcRowA;
+ const GLubyte *rowB = (const GLubyte *) srcRowB;
+ GLubyte *dst = (GLubyte *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGBA_FLOAT32:
+ {
+ GLuint i, j, k;
+ const GLfloat (*rowA)[4] = (const GLfloat (*)[4]) srcRowA;
+ const GLfloat (*rowB)[4] = (const GLfloat (*)[4]) srcRowB;
+ GLfloat (*dst)[4] = (GLfloat (*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) * 0.25F;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) * 0.25F;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) * 0.25F;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] +
+ rowB[j][3] + rowB[k][3]) * 0.25F;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGBA_FLOAT16:
+ {
+ GLuint i, j, k, comp;
+ const GLhalfARB (*rowA)[4] = (const GLhalfARB (*)[4]) srcRowA;
+ const GLhalfARB (*rowB)[4] = (const GLhalfARB (*)[4]) srcRowB;
+ GLhalfARB (*dst)[4] = (GLhalfARB (*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ for (comp = 0; comp < 4; comp++) {
+ GLfloat aj, ak, bj, bk;
+ aj = _mesa_half_to_float(rowA[j][comp]);
+ ak = _mesa_half_to_float(rowA[k][comp]);
+ bj = _mesa_half_to_float(rowB[j][comp]);
+ bk = _mesa_half_to_float(rowB[k][comp]);
+ dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ }
+ return;
+ case MESA_FORMAT_RGB_FLOAT32:
+ {
+ GLuint i, j, k;
+ const GLfloat (*rowA)[3] = (const GLfloat (*)[3]) srcRowA;
+ const GLfloat (*rowB)[3] = (const GLfloat (*)[3]) srcRowB;
+ GLfloat (*dst)[3] = (GLfloat (*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) * 0.25F;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) * 0.25F;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) * 0.25F;
+ }
+ }
+ return;
+ case MESA_FORMAT_RGB_FLOAT16:
+ {
+ GLuint i, j, k, comp;
+ const GLhalfARB (*rowA)[3] = (const GLhalfARB (*)[3]) srcRowA;
+ const GLhalfARB (*rowB)[3] = (const GLhalfARB (*)[3]) srcRowB;
+ GLhalfARB (*dst)[3] = (GLhalfARB (*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ for (comp = 0; comp < 3; comp++) {
+ GLfloat aj, ak, bj, bk;
+ aj = _mesa_half_to_float(rowA[j][comp]);
+ ak = _mesa_half_to_float(rowA[k][comp]);
+ bj = _mesa_half_to_float(rowB[j][comp]);
+ bk = _mesa_half_to_float(rowB[k][comp]);
+ dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ }
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ {
+ GLuint i, j, k;
+ const GLfloat (*rowA)[2] = (const GLfloat (*)[2]) srcRowA;
+ const GLfloat (*rowB)[2] = (const GLfloat (*)[2]) srcRowB;
+ GLfloat (*dst)[2] = (GLfloat (*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) * 0.25F;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) * 0.25F;
+ }
+ }
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ {
+ GLuint i, j, k, comp;
+ const GLhalfARB (*rowA)[2] = (const GLhalfARB (*)[2]) srcRowA;
+ const GLhalfARB (*rowB)[2] = (const GLhalfARB (*)[2]) srcRowB;
+ GLhalfARB (*dst)[2] = (GLhalfARB (*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ for (comp = 0; comp < 2; comp++) {
+ GLfloat aj, ak, bj, bk;
+ aj = _mesa_half_to_float(rowA[j][comp]);
+ ak = _mesa_half_to_float(rowA[k][comp]);
+ bj = _mesa_half_to_float(rowB[j][comp]);
+ bk = _mesa_half_to_float(rowB[k][comp]);
+ dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ }
+ return;
+ case MESA_FORMAT_ALPHA_FLOAT32:
+ case MESA_FORMAT_LUMINANCE_FLOAT32:
+ case MESA_FORMAT_INTENSITY_FLOAT32:
+ {
+ GLuint i, j, k;
+ const GLfloat *rowA = (const GLfloat *) srcRowA;
+ const GLfloat *rowB = (const GLfloat *) srcRowB;
+ GLfloat *dst = (GLfloat *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F;
+ }
+ }
+ return;
+ case MESA_FORMAT_ALPHA_FLOAT16:
+ case MESA_FORMAT_LUMINANCE_FLOAT16:
+ case MESA_FORMAT_INTENSITY_FLOAT16:
+ {
+ GLuint i, j, k;
+ const GLhalfARB *rowA = (const GLhalfARB *) srcRowA;
+ const GLhalfARB *rowB = (const GLhalfARB *) srcRowB;
+ GLhalfARB *dst = (GLhalfARB *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ GLfloat aj, ak, bj, bk;
+ aj = _mesa_half_to_float(rowA[j]);
+ ak = _mesa_half_to_float(rowA[k]);
+ bj = _mesa_half_to_float(rowB[j]);
+ bk = _mesa_half_to_float(rowB[k]);
+ dst[i] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ return;
+
+ default:
+ _mesa_problem(NULL, "bad format in do_row()");
+ }
+}
+
+
+/*
+ * These functions generate a 1/2-size mipmap image from a source image.
+ * Texture borders are handled by copying or averaging the source image's
+ * border texels, depending on the scale-down factor.
+ */
+
+static void
+make_1d_mipmap(const struct gl_texture_format *format, GLint border,
+ GLint srcWidth, const GLubyte *srcPtr,
+ GLint dstWidth, GLubyte *dstPtr)
+{
+ const GLint bpt = format->TexelBytes;
+ const GLubyte *src;
+ GLubyte *dst;
+
+ /* skip the border pixel, if any */
+ src = srcPtr + border * bpt;
+ dst = dstPtr + border * bpt;
+
+ /* we just duplicate the input row, kind of hack, saves code */
+ do_row(format, srcWidth - 2 * border, src, src,
+ dstWidth - 2 * border, dst);
+
+ if (border) {
+ /* copy left-most pixel from source */
+ MEMCPY(dstPtr, srcPtr, bpt);
+ /* copy right-most pixel from source */
+ MEMCPY(dstPtr + (dstWidth - 1) * bpt,
+ srcPtr + (srcWidth - 1) * bpt,
+ bpt);
+ }
+}
+
+
+/**
+ * XXX need to use the tex image's row stride!
+ */
+static void
+make_2d_mipmap(const struct gl_texture_format *format, GLint border,
+ GLint srcWidth, GLint srcHeight, const GLubyte *srcPtr,
+ GLint dstWidth, GLint dstHeight, GLubyte *dstPtr)
+{
+ const GLint bpt = format->TexelBytes;
+ const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
+ const GLint dstWidthNB = dstWidth - 2 * border;
+ const GLint dstHeightNB = dstHeight - 2 * border;
+ const GLint srcRowStride = bpt * srcWidth;
+ const GLint dstRowStride = bpt * dstWidth;
+ const GLubyte *srcA, *srcB;
+ GLubyte *dst;
+ GLint row;
+
+ /* Compute src and dst pointers, skipping any border */
+ srcA = srcPtr + border * ((srcWidth + 1) * bpt);
+ if (srcHeight > 1)
+ srcB = srcA + srcRowStride;
+ else
+ srcB = srcA;
+ dst = dstPtr + border * ((dstWidth + 1) * bpt);
+
+ for (row = 0; row < dstHeightNB; row++) {
+ do_row(format, srcWidthNB, srcA, srcB,
+ dstWidthNB, dst);
+ srcA += 2 * srcRowStride;
+ srcB += 2 * srcRowStride;
+ dst += dstRowStride;
+ }
+
+ /* This is ugly but probably won't be used much */
+ if (border > 0) {
+ /* fill in dest border */
+ /* lower-left border pixel */
+ MEMCPY(dstPtr, srcPtr, bpt);
+ /* lower-right border pixel */
+ MEMCPY(dstPtr + (dstWidth - 1) * bpt,
+ srcPtr + (srcWidth - 1) * bpt, bpt);
+ /* upper-left border pixel */
+ MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt,
+ srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt);
+ /* upper-right border pixel */
+ MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt,
+ srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt);
+ /* lower border */
+ do_row(format, srcWidthNB,
+ srcPtr + bpt,
+ srcPtr + bpt,
+ dstWidthNB, dstPtr + bpt);
+ /* upper border */
+ do_row(format, srcWidthNB,
+ srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
+ srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
+ dstWidthNB,
+ dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt);
+ /* left and right borders */
+ if (srcHeight == dstHeight) {
+ /* copy border pixel from src to dst */
+ for (row = 1; row < srcHeight; row++) {
+ MEMCPY(dstPtr + dstWidth * row * bpt,
+ srcPtr + srcWidth * row * bpt, bpt);
+ MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
+ srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt);
+ }
+ }
+ else {
+ /* average two src pixels each dest pixel */
+ for (row = 0; row < dstHeightNB; row += 2) {
+ do_row(format, 1,
+ srcPtr + (srcWidth * (row * 2 + 1)) * bpt,
+ srcPtr + (srcWidth * (row * 2 + 2)) * bpt,
+ 1, dstPtr + (dstWidth * row + 1) * bpt);
+ do_row(format, 1,
+ srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt,
+ srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt,
+ 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt);
+ }
+ }
+ }
+}
+
+
+static void
+make_3d_mipmap(const struct gl_texture_format *format, GLint border,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ const GLubyte *srcPtr,
+ GLint dstWidth, GLint dstHeight, GLint dstDepth,
+ GLubyte *dstPtr)
+{
+ const GLint bpt = format->TexelBytes;
+ const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
+ const GLint srcDepthNB = srcDepth - 2 * border;
+ const GLint dstWidthNB = dstWidth - 2 * border;
+ const GLint dstHeightNB = dstHeight - 2 * border;
+ const GLint dstDepthNB = dstDepth - 2 * border;
+ GLvoid *tmpRowA, *tmpRowB;
+ GLint img, row;
+ GLint bytesPerSrcImage, bytesPerDstImage;
+ GLint bytesPerSrcRow, bytesPerDstRow;
+ GLint srcImageOffset, srcRowOffset;
+
+ (void) srcDepthNB; /* silence warnings */
+
+ /* Need two temporary row buffers */
+ tmpRowA = _mesa_malloc(srcWidth * bpt);
+ if (!tmpRowA)
+ return;
+ tmpRowB = _mesa_malloc(srcWidth * bpt);
+ if (!tmpRowB) {
+ _mesa_free(tmpRowA);
+ return;
+ }
+
+ bytesPerSrcImage = srcWidth * srcHeight * bpt;
+ bytesPerDstImage = dstWidth * dstHeight * bpt;
+
+ bytesPerSrcRow = srcWidth * bpt;
+ bytesPerDstRow = dstWidth * bpt;
+
+ /* Offset between adjacent src images to be averaged together */
+ srcImageOffset = (srcDepth == dstDepth) ? 0 : bytesPerSrcImage;
+
+ /* Offset between adjacent src rows to be averaged together */
+ srcRowOffset = (srcHeight == dstHeight) ? 0 : srcWidth * bpt;
+
+ /*
+ * Need to average together up to 8 src pixels for each dest pixel.
+ * Break that down into 3 operations:
+ * 1. take two rows from source image and average them together.
+ * 2. take two rows from next source image and average them together.
+ * 3. take the two averaged rows and average them for the final dst row.
+ */
+
+ /*
+ _mesa_printf("mip3d %d x %d x %d -> %d x %d x %d\n",
+ srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth);
+ */
+
+ for (img = 0; img < dstDepthNB; img++) {
+ /* first source image pointer, skipping border */
+ const GLubyte *imgSrcA = srcPtr
+ + (bytesPerSrcImage + bytesPerSrcRow + border) * bpt * border
+ + img * (bytesPerSrcImage + srcImageOffset);
+ /* second source image pointer, skipping border */
+ const GLubyte *imgSrcB = imgSrcA + srcImageOffset;
+ /* address of the dest image, skipping border */
+ GLubyte *imgDst = dstPtr
+ + (bytesPerDstImage + bytesPerDstRow + border) * bpt * border
+ + img * bytesPerDstImage;
+
+ /* setup the four source row pointers and the dest row pointer */
+ const GLubyte *srcImgARowA = imgSrcA;
+ const GLubyte *srcImgARowB = imgSrcA + srcRowOffset;
+ const GLubyte *srcImgBRowA = imgSrcB;
+ const GLubyte *srcImgBRowB = imgSrcB + srcRowOffset;
+ GLubyte *dstImgRow = imgDst;
+
+ for (row = 0; row < dstHeightNB; row++) {
+ /* Average together two rows from first src image */
+ do_row(format, srcWidthNB, srcImgARowA, srcImgARowB,
+ srcWidthNB, tmpRowA);
+ /* Average together two rows from second src image */
+ do_row(format, srcWidthNB, srcImgBRowA, srcImgBRowB,
+ srcWidthNB, tmpRowB);
+ /* Average together the temp rows to make the final row */
+ do_row(format, srcWidthNB, tmpRowA, tmpRowB,
+ dstWidthNB, dstImgRow);
+ /* advance to next rows */
+ srcImgARowA += bytesPerSrcRow + srcRowOffset;
+ srcImgARowB += bytesPerSrcRow + srcRowOffset;
+ srcImgBRowA += bytesPerSrcRow + srcRowOffset;
+ srcImgBRowB += bytesPerSrcRow + srcRowOffset;
+ dstImgRow += bytesPerDstRow;
+ }
+ }
+
+ _mesa_free(tmpRowA);
+ _mesa_free(tmpRowB);
+
+ /* Luckily we can leverage the make_2d_mipmap() function here! */
+ if (border > 0) {
+ /* do front border image */
+ make_2d_mipmap(format, 1, srcWidth, srcHeight, srcPtr,
+ dstWidth, dstHeight, dstPtr);
+ /* do back border image */
+ make_2d_mipmap(format, 1, srcWidth, srcHeight,
+ srcPtr + bytesPerSrcImage * (srcDepth - 1),
+ dstWidth, dstHeight,
+ dstPtr + bytesPerDstImage * (dstDepth - 1));
+ /* do four remaining border edges that span the image slices */
+ if (srcDepth == dstDepth) {
+ /* just copy border pixels from src to dst */
+ for (img = 0; img < dstDepthNB; img++) {
+ const GLubyte *src;
+ GLubyte *dst;
+
+ /* do border along [img][row=0][col=0] */
+ src = srcPtr + (img + 1) * bytesPerSrcImage;
+ dst = dstPtr + (img + 1) * bytesPerDstImage;
+ MEMCPY(dst, src, bpt);
+
+ /* do border along [img][row=dstHeight-1][col=0] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ + (srcHeight - 1) * bytesPerSrcRow;
+ dst = dstPtr + (img + 1) * bytesPerDstImage
+ + (dstHeight - 1) * bytesPerDstRow;
+ MEMCPY(dst, src, bpt);
+
+ /* do border along [img][row=0][col=dstWidth-1] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ + (srcWidth - 1) * bpt;
+ dst = dstPtr + (img + 1) * bytesPerDstImage
+ + (dstWidth - 1) * bpt;
+ MEMCPY(dst, src, bpt);
+
+ /* do border along [img][row=dstHeight-1][col=dstWidth-1] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ + (bytesPerSrcImage - bpt);
+ dst = dstPtr + (img + 1) * bytesPerDstImage
+ + (bytesPerDstImage - bpt);
+ MEMCPY(dst, src, bpt);
+ }
+ }
+ else {
+ /* average border pixels from adjacent src image pairs */
+ ASSERT(srcDepthNB == 2 * dstDepthNB);
+ for (img = 0; img < dstDepthNB; img++) {
+ const GLubyte *src;
+ GLubyte *dst;
+
+ /* do border along [img][row=0][col=0] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage;
+ dst = dstPtr + (img + 1) * bytesPerDstImage;
+ do_row(format, 1, src, src + srcImageOffset, 1, dst);
+
+ /* do border along [img][row=dstHeight-1][col=0] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ + (srcHeight - 1) * bytesPerSrcRow;
+ dst = dstPtr + (img + 1) * bytesPerDstImage
+ + (dstHeight - 1) * bytesPerDstRow;
+ do_row(format, 1, src, src + srcImageOffset, 1, dst);
+
+ /* do border along [img][row=0][col=dstWidth-1] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ + (srcWidth - 1) * bpt;
+ dst = dstPtr + (img + 1) * bytesPerDstImage
+ + (dstWidth - 1) * bpt;
+ do_row(format, 1, src, src + srcImageOffset, 1, dst);
+
+ /* do border along [img][row=dstHeight-1][col=dstWidth-1] */
+ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ + (bytesPerSrcImage - bpt);
+ dst = dstPtr + (img + 1) * bytesPerDstImage
+ + (bytesPerDstImage - bpt);
+ do_row(format, 1, src, src + srcImageOffset, 1, dst);
+ }
+ }
+ }
+}
+
+
+/**
+ * For GL_SGIX_generate_mipmap:
+ * Generate a complete set of mipmaps from texObj's base-level image.
+ * Stop at texObj's MaxLevel or when we get to the 1x1 texture.
+ */
+void
+_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
+ const struct gl_texture_unit *texUnit,
+ struct gl_texture_object *texObj)
+{
+ const struct gl_texture_image *srcImage;
+ const struct gl_texture_format *convertFormat;
+ const GLubyte *srcData = NULL;
+ GLubyte *dstData = NULL;
+ GLint level, maxLevels;
+
+ ASSERT(texObj);
+ /* XXX choose cube map face here??? */
+ srcImage = texObj->Image[0][texObj->BaseLevel];
+ ASSERT(srcImage);
+
+ maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
+ ASSERT(maxLevels > 0); /* bad target */
+
+ /* Find convertFormat - the format that do_row() will process */
+ if (srcImage->IsCompressed) {
+ /* setup for compressed textures */
+ GLuint row;
+ GLint components, size;
+ GLchan *dst;
+
+ assert(texObj->Target == GL_TEXTURE_2D);
+
+ if (srcImage->_BaseFormat == GL_RGB) {
+ convertFormat = &_mesa_texformat_rgb;
+ components = 3;
+ }
+ else if (srcImage->_BaseFormat == GL_RGBA) {
+ convertFormat = &_mesa_texformat_rgba;
+ components = 4;
+ }
+ else {
+ _mesa_problem(ctx, "bad srcImage->_BaseFormat in _mesa_generate_mipmaps");
+ return;
+ }
+
+ /* allocate storage for uncompressed GL_RGB or GL_RGBA images */
+ size = _mesa_bytes_per_pixel(srcImage->_BaseFormat, CHAN_TYPE)
+ * srcImage->Width * srcImage->Height * srcImage->Depth + 20;
+ /* 20 extra bytes, just be safe when calling last FetchTexel */
+ srcData = (GLubyte *) _mesa_malloc(size);
+ if (!srcData) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps");
+ return;
+ }
+ dstData = (GLubyte *) _mesa_malloc(size / 2); /* 1/4 would probably be OK */
+ if (!dstData) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps");
+ _mesa_free((void *) srcData);
+ return;
+ }
+
+ /* decompress base image here */
+ dst = (GLchan *) srcData;
+ for (row = 0; row < srcImage->Height; row++) {
+ GLuint col;
+ for (col = 0; col < srcImage->Width; col++) {
+ srcImage->FetchTexelc(srcImage, col, row, 0, dst);
+ dst += components;
+ }
+ }
+ }
+ else {
+ /* uncompressed */
+ convertFormat = srcImage->TexFormat;
+ }
+
+ for (level = texObj->BaseLevel; level < texObj->MaxLevel
+ && level < maxLevels - 1; level++) {
+ /* generate image[level+1] from image[level] */
+ const struct gl_texture_image *srcImage;
+ struct gl_texture_image *dstImage;
+ GLint srcWidth, srcHeight, srcDepth;
+ GLint dstWidth, dstHeight, dstDepth;
+ GLint border, bytesPerTexel;
+
+ /* get src image parameters */
+ srcImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ ASSERT(srcImage);
+ srcWidth = srcImage->Width;
+ srcHeight = srcImage->Height;
+ srcDepth = srcImage->Depth;
+ border = srcImage->Border;
+
+ /* compute next (level+1) image size */
+ if (srcWidth - 2 * border > 1) {
+ dstWidth = (srcWidth - 2 * border) / 2 + 2 * border;
+ }
+ else {
+ dstWidth = srcWidth; /* can't go smaller */
+ }
+ if (srcHeight - 2 * border > 1) {
+ dstHeight = (srcHeight - 2 * border) / 2 + 2 * border;
+ }
+ else {
+ dstHeight = srcHeight; /* can't go smaller */
+ }
+ if (srcDepth - 2 * border > 1) {
+ dstDepth = (srcDepth - 2 * border) / 2 + 2 * border;
+ }
+ else {
+ dstDepth = srcDepth; /* can't go smaller */
+ }
+
+ if (dstWidth == srcWidth &&
+ dstHeight == srcHeight &&
+ dstDepth == srcDepth) {
+ /* all done */
+ if (srcImage->IsCompressed) {
+ _mesa_free((void *) srcData);
+ _mesa_free(dstData);
+ }
+ return;
+ }
+
+ /* get dest gl_texture_image */
+ dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1);
+ if (!dstImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
+ return;
+ }
+
+ /* Free old image data */
+ if (dstImage->Data)
+ ctx->Driver.FreeTexImageData(ctx, dstImage);
+
+ /* initialize new image */
+ _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
+ dstDepth, border, srcImage->InternalFormat);
+ dstImage->DriverData = NULL;
+ dstImage->TexFormat = srcImage->TexFormat;
+ dstImage->FetchTexelc = srcImage->FetchTexelc;
+ dstImage->FetchTexelf = srcImage->FetchTexelf;
+ dstImage->IsCompressed = srcImage->IsCompressed;
+ if (dstImage->IsCompressed) {
+ dstImage->CompressedSize
+ = ctx->Driver.CompressedTextureSize(ctx, dstImage->Width,
+ dstImage->Height,
+ dstImage->Depth,
+ dstImage->TexFormat->MesaFormat);
+ ASSERT(dstImage->CompressedSize > 0);
+ }
+
+ ASSERT(dstImage->TexFormat);
+ ASSERT(dstImage->FetchTexelc);
+ ASSERT(dstImage->FetchTexelf);
+
+ /* Alloc new teximage data buffer.
+ * Setup src and dest data pointers.
+ */
+ if (dstImage->IsCompressed) {
+ dstImage->Data = _mesa_alloc_texmemory(dstImage->CompressedSize);
+ if (!dstImage->Data) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
+ return;
+ }
+ /* srcData and dstData are already set */
+ ASSERT(srcData);
+ ASSERT(dstData);
+ }
+ else {
+ bytesPerTexel = dstImage->TexFormat->TexelBytes;
+ ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0);
+ dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight
+ * dstDepth * bytesPerTexel);
+ if (!dstImage->Data) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
+ return;
+ }
+ srcData = (const GLubyte *) srcImage->Data;
+ dstData = (GLubyte *) dstImage->Data;
+ }
+
+ /*
+ * We use simple 2x2 averaging to compute the next mipmap level.
+ */
+ switch (target) {
+ case GL_TEXTURE_1D:
+ make_1d_mipmap(convertFormat, border,
+ srcWidth, srcData,
+ dstWidth, dstData);
+ break;
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ make_2d_mipmap(convertFormat, border,
+ srcWidth, srcHeight, srcData,
+ dstWidth, dstHeight, dstData);
+ break;
+ case GL_TEXTURE_3D:
+ make_3d_mipmap(convertFormat, border,
+ srcWidth, srcHeight, srcDepth, srcData,
+ dstWidth, dstHeight, dstDepth, dstData);
+ break;
+ case GL_TEXTURE_RECTANGLE_NV:
+ /* no mipmaps, do nothing */
+ break;
+ default:
+ _mesa_problem(ctx, "bad dimensions in _mesa_generate_mipmaps");
+ return;
+ }
+
+ if (dstImage->IsCompressed) {
+ GLubyte *temp;
+ /* compress image from dstData into dstImage->Data */
+ const GLenum srcFormat = convertFormat->BaseFormat;
+ GLint dstRowStride
+ = _mesa_compressed_row_stride(dstImage->TexFormat->MesaFormat, dstWidth);
+ ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA);
+ dstImage->TexFormat->StoreImage(ctx, 2, dstImage->_BaseFormat,
+ dstImage->TexFormat,
+ dstImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride, 0, /* strides */
+ dstWidth, dstHeight, 1, /* size */
+ srcFormat, CHAN_TYPE,
+ dstData, /* src data, actually */
+ &ctx->DefaultPacking);
+ /* swap src and dest pointers */
+ temp = (GLubyte *) srcData;
+ srcData = dstData;
+ dstData = temp;
+ }
+
+ } /* loop over mipmap levels */
+}
+
+
+/**
+ * Helper function for drivers which need to rescale texture images to
+ * certain aspect ratios.
+ * Nearest filtering only (for broken hardware that can't support
+ * all aspect ratios). This can be made a lot faster, but I don't
+ * really care enough...
+ */
+void
+_mesa_rescale_teximage2d(GLuint bytesPerPixel,
+ GLuint srcStrideInPixels,
+ GLuint dstRowStride,
+ GLint srcWidth, GLint srcHeight,
+ GLint dstWidth, GLint dstHeight,
+ const GLvoid *srcImage, GLvoid *dstImage)
+{
+ GLint row, col;
+
+#define INNER_LOOP( TYPE, HOP, WOP ) \
+ for ( row = 0 ; row < dstHeight ; row++ ) { \
+ GLint srcRow = row HOP hScale; \
+ for ( col = 0 ; col < dstWidth ; col++ ) { \
+ GLint srcCol = col WOP wScale; \
+ dst[col] = src[srcRow * srcStrideInPixels + srcCol]; \
+ } \
+ dst = (TYPE *) ((GLubyte *) dst + dstRowStride); \
+ } \
+
+#define RESCALE_IMAGE( TYPE ) \
+do { \
+ const TYPE *src = (const TYPE *)srcImage; \
+ TYPE *dst = (TYPE *)dstImage; \
+ \
+ if ( srcHeight < dstHeight ) { \
+ const GLint hScale = dstHeight / srcHeight; \
+ if ( srcWidth < dstWidth ) { \
+ const GLint wScale = dstWidth / srcWidth; \
+ INNER_LOOP( TYPE, /, / ); \
+ } \
+ else { \
+ const GLint wScale = srcWidth / dstWidth; \
+ INNER_LOOP( TYPE, /, * ); \
+ } \
+ } \
+ else { \
+ const GLint hScale = srcHeight / dstHeight; \
+ if ( srcWidth < dstWidth ) { \
+ const GLint wScale = dstWidth / srcWidth; \
+ INNER_LOOP( TYPE, *, / ); \
+ } \
+ else { \
+ const GLint wScale = srcWidth / dstWidth; \
+ INNER_LOOP( TYPE, *, * ); \
+ } \
+ } \
+} while (0)
+
+ switch ( bytesPerPixel ) {
+ case 4:
+ RESCALE_IMAGE( GLuint );
+ break;
+
+ case 2:
+ RESCALE_IMAGE( GLushort );
+ break;
+
+ case 1:
+ RESCALE_IMAGE( GLubyte );
+ break;
+ default:
+ _mesa_problem(NULL,"unexpected bytes/pixel in _mesa_rescale_teximage2d");
+ }
+}
+
+
+/**
+ * Upscale an image by replication, not (typical) stretching.
+ * We use this when the image width or height is less than a
+ * certain size (4, 8) and we need to upscale an image.
+ */
+void
+_mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
+ GLsizei outWidth, GLsizei outHeight,
+ GLint comps, const GLchan *src, GLint srcRowStride,
+ GLchan *dest )
+{
+ GLint i, j, k;
+
+ ASSERT(outWidth >= inWidth);
+ ASSERT(outHeight >= inHeight);
+#if 0
+ ASSERT(inWidth == 1 || inWidth == 2 || inHeight == 1 || inHeight == 2);
+ ASSERT((outWidth & 3) == 0);
+ ASSERT((outHeight & 3) == 0);
+#endif
+
+ for (i = 0; i < outHeight; i++) {
+ const GLint ii = i % inHeight;
+ for (j = 0; j < outWidth; j++) {
+ const GLint jj = j % inWidth;
+ for (k = 0; k < comps; k++) {
+ dest[(i * outWidth + j) * comps + k]
+ = src[ii * srcRowStride + jj * comps + k];
+ }
+ }
+ }
+}
+
diff --git a/src/mesa/main/mipmap.h b/src/mesa/main/mipmap.h
new file mode 100644
index 00000000000..df786032838
--- /dev/null
+++ b/src/mesa/main/mipmap.h
@@ -0,0 +1,52 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.2
+ *
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef MIPMAP_H
+#define MIPMAP_H
+
+#include "mtypes.h"
+
+extern void
+_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
+ const struct gl_texture_unit *texUnit,
+ struct gl_texture_object *texObj);
+
+
+extern void
+_mesa_rescale_teximage2d(GLuint bytesPerPixel,
+ GLuint srcStrideInPixels,
+ GLuint dstRowStride,
+ GLint srcWidth, GLint srcHeight,
+ GLint dstWidth, GLint dstHeight,
+ const GLvoid *srcImage, GLvoid *dstImage);
+
+extern void
+_mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
+ GLsizei outWidth, GLsizei outHeight,
+ GLint comps, const GLchan *src, GLint srcRowStride,
+ GLchan *dest);
+
+
+#endif /* MIPMAP_H */
diff --git a/src/mesa/main/mm.c b/src/mesa/main/mm.c
index 7a657dc3cad..846c329c70d 100644
--- a/src/mesa/main/mm.c
+++ b/src/mesa/main/mm.c
@@ -234,8 +234,6 @@ Join2Blocks(struct mem_block *p)
int
mmFreeMem(struct mem_block *b)
{
- struct mem_block *heap = b->heap;
-
if (!b)
return 0;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2bb6d93c390..0ed73beb3c5 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -392,9 +392,9 @@ struct gl_color_table
{
GLenum InternalFormat; /**< The user-specified format */
GLenum _BaseFormat; /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */
- GLuint Size; /**< number of entries (rows) in table */
- GLvoid *Table; /**< points to data of <Type> */
- GLenum Type; /**< GL_UNSIGNED_BYTE or GL_FLOAT */
+ GLuint Size; /**< number of entries in table */
+ GLfloat *TableF; /**< Color table, floating point values */
+ GLubyte *TableUB; /**< Color table, ubyte values */
GLubyte RedSize;
GLubyte GreenSize;
GLubyte BlueSize;
@@ -888,6 +888,7 @@ struct gl_light_attrib
GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */
GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */
GLboolean ColorMaterialEnabled;
+ GLenum ClampVertexColor;
struct gl_light EnabledList; /**< List sentinel */
@@ -1809,18 +1810,6 @@ struct gl_evaluators
/**
- * State used during execution of fragment programs.
- */
-struct fp_machine
-{
- GLfloat Temporaries[MAX_NV_FRAGMENT_PROGRAM_TEMPS][4];
- GLfloat Inputs[MAX_NV_FRAGMENT_PROGRAM_INPUTS][4];
- GLfloat Outputs[MAX_NV_FRAGMENT_PROGRAM_OUTPUTS][4];
- GLuint CondCodes[4];
-};
-
-
-/**
* Names of the various vertex/fragment program register files, etc.
* NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
* All values should fit in a 4-bit field.
@@ -1925,30 +1914,25 @@ struct gl_program_state
/**
- * State vars for GL_ARB/GL_NV_vertex_program
+ * Context state for vertex programs.
*/
struct gl_vertex_program_state
{
- GLboolean Enabled; /**< GL_VERTEX_PROGRAM_ARB/NV */
- GLboolean _Enabled; /**< Enabled and valid program? */
- GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
- GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
+ GLboolean Enabled; /**< GL_VERTEX_PROGRAM_ARB/NV */
+ GLboolean _Enabled; /**< Enabled and valid program? */
+ GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
+ GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
struct gl_vertex_program *Current; /**< ptr to currently bound program */
const struct gl_vertex_program *_Current; /**< ptr to currently bound
program, including internal
(t_vp_build.c) programs */
+ GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /**< Env params */
+
+ /* For GL_NV_vertex_program only: */
GLenum TrackMatrix[MAX_NV_VERTEX_PROGRAM_PARAMS / 4];
GLenum TrackMatrixTransform[MAX_NV_VERTEX_PROGRAM_PARAMS / 4];
- GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /* Env params */
- /* Only used during program execution (may be moved someday): */
- GLfloat Temporaries[MAX_NV_VERTEX_PROGRAM_TEMPS][4];
- GLfloat Inputs[MAX_NV_VERTEX_PROGRAM_INPUTS][4];
- GLuint InputsSize[MAX_NV_VERTEX_PROGRAM_INPUTS];
- GLfloat Outputs[MAX_NV_VERTEX_PROGRAM_OUTPUTS][4];
- GLint AddressReg[4];
-
#if FEATURE_MESA_program_debug
GLprogramcallbackMESA Callback;
GLvoid *CallbackData;
@@ -1959,18 +1943,17 @@ struct gl_vertex_program_state
/**
- * Context state for GL_ARB/NV_fragment_program
+ * Context state for fragment programs.
*/
struct gl_fragment_program_state
{
- GLboolean Enabled; /* GL_VERTEX_PROGRAM_NV */
- GLboolean _Enabled; /* Enabled and valid program? */
- GLboolean _Active;
- struct gl_fragment_program *Current; /* ptr to currently bound program */
- const struct gl_fragment_program *_Current; /* ptr to currently active program
+ GLboolean Enabled; /**< User-set fragment program enable flag */
+ GLboolean _Enabled; /**< Fragment program enabled and valid? */
+ GLboolean _Active; /**< Is a user program or internal program active? */
+ struct gl_fragment_program *Current; /**< User-bound program */
+ const struct gl_fragment_program *_Current; /**< currently active program
(including internal programs) */
- struct fp_machine Machine; /* machine state */
- GLfloat Parameters[MAX_NV_FRAGMENT_PROGRAM_PARAMS][4]; /* Env params */
+ GLfloat Parameters[MAX_NV_FRAGMENT_PROGRAM_PARAMS][4]; /**< Env params */
#if FEATURE_MESA_program_debug
GLprogramcallbackMESA Callback;
@@ -1991,17 +1974,6 @@ struct atifs_instruction;
struct atifs_setupinst;
/**
- * State for executing ATI fragment shader.
- */
-struct atifs_machine
-{
- GLfloat Registers[6][4]; /** six temporary registers */
- GLfloat PrevPassRegisters[6][4];
- GLfloat Inputs[2][4]; /** Primary, secondary input colors */
-};
-
-
-/**
* ATI fragment shader
*/
struct ati_fragment_shader
@@ -2031,7 +2003,6 @@ struct gl_ati_fragment_shader_state
GLboolean _Enabled; /** enabled and valid shader? */
GLboolean Compiling;
GLfloat GlobalConstants[8][4];
- struct atifs_machine Machine; /* machine state */
struct ati_fragment_shader *Current;
};
@@ -2092,6 +2063,19 @@ struct gl_shared_state
/*@}*/
/**
+ * \name Thread safety and statechange notification for texture
+ * objects.
+ *
+ * \todo Improve the granularity of locking.
+ */
+ /*@{*/
+ _glthread_Mutex TexMutex; /**< texobj thread safety */
+ GLuint TextureStateStamp; /**< state notification for shared tex */
+ /*@}*/
+
+
+
+ /**
* \name Vertex/fragment programs
*/
/*@{*/
@@ -2340,6 +2324,8 @@ struct gl_program_constants
GLuint MaxNativeTemps;
GLuint MaxNativeAddressRegs; /* vertex program only, for now */
GLuint MaxNativeParameters;
+ /* For shaders */
+ GLuint MaxUniformComponents;
};
@@ -2389,6 +2375,9 @@ struct gl_constants
/* GL_EXT_framebuffer_object */
GLuint MaxColorAttachments;
GLuint MaxRenderbufferSize;
+ /* GL_ARB_vertex_shader */
+ GLuint MaxVertexTextureImageUnits;
+ GLuint MaxVaryingFloats;
};
@@ -2417,6 +2406,7 @@ struct gl_extensions
GLboolean ARB_point_sprite;
GLboolean ARB_shader_objects;
GLboolean ARB_shading_language_100;
+ GLboolean ARB_shading_language_120;
GLboolean ARB_shadow;
GLboolean ARB_texture_border_clamp;
GLboolean ARB_texture_compression;
@@ -2955,6 +2945,8 @@ struct __GLcontextRec
GLboolean _ForceEyeCoords;
GLenum _CurrentProgram; /* currently executing program */
+ GLuint TextureStateTimestamp; /* detect changes to shared state */
+
struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */
struct gl_shine_tab *_ShineTabList; /**< MRU list of inactive shine tables */
/**@}*/
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 3b1f848e8c3..4e47cdba890 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -1171,200 +1171,88 @@ void
_mesa_lookup_rgba_float(const struct gl_color_table *table,
GLuint n, GLfloat rgba[][4])
{
- if (!table->Table || table->Size == 0)
+ const GLint max = table->Size - 1;
+ const GLfloat scale = (GLfloat) max;
+ const GLfloat *lut = table->TableF;
+ GLuint i;
+
+ if (!table->TableF || table->Size == 0)
return;
switch (table->_BaseFormat) {
case GL_INTENSITY:
/* replace RGBA with I */
- if (table->Type == GL_FLOAT) {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = lut[CLAMP(j, 0, max)];
- rgba[i][RCOMP] = rgba[i][GCOMP] =
- rgba[i][BCOMP] = rgba[i][ACOMP] = c;
- }
- }
- else {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = CHAN_TO_FLOAT(lut[CLAMP(j, 0, max)]);
- rgba[i][RCOMP] = rgba[i][GCOMP] =
- rgba[i][BCOMP] = rgba[i][ACOMP] = c;
- }
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][RCOMP] * scale);
+ GLfloat c = lut[CLAMP(j, 0, max)];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = c;
}
break;
case GL_LUMINANCE:
/* replace RGB with L */
- if (table->Type == GL_FLOAT) {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = lut[CLAMP(j, 0, max)];
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = c;
- }
- }
- else {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = CHAN_TO_FLOAT(lut[CLAMP(j, 0, max)]);
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = c;
- }
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][RCOMP] * scale);
+ GLfloat c = lut[CLAMP(j, 0, max)];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = c;
}
break;
case GL_ALPHA:
/* replace A with A */
- if (table->Type == GL_FLOAT) {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
- }
- }
- else {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = CHAN_TO_FLOAT(lut[CLAMP(j, 0, max)]);
- }
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][ACOMP] * scale);
+ rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
}
break;
case GL_LUMINANCE_ALPHA:
/* replace RGBA with LLLA */
- if (table->Type == GL_FLOAT) {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jL = IROUND(rgba[i][RCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- GLfloat luminance, alpha;
- jL = CLAMP(jL, 0, max);
- jA = CLAMP(jA, 0, max);
- luminance = lut[jL * 2 + 0];
- alpha = lut[jA * 2 + 1];
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;;
- }
- }
- else {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jL = IROUND(rgba[i][RCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- GLfloat luminance, alpha;
- jL = CLAMP(jL, 0, max);
- jA = CLAMP(jA, 0, max);
- luminance = CHAN_TO_FLOAT(lut[jL * 2 + 0]);
- alpha = CHAN_TO_FLOAT(lut[jA * 2 + 1]);
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;;
- }
+ for (i = 0; i < n; i++) {
+ GLint jL = IROUND(rgba[i][RCOMP] * scale);
+ GLint jA = IROUND(rgba[i][ACOMP] * scale);
+ GLfloat luminance, alpha;
+ jL = CLAMP(jL, 0, max);
+ jA = CLAMP(jA, 0, max);
+ luminance = lut[jL * 2 + 0];
+ alpha = lut[jA * 2 + 1];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = luminance;
+ rgba[i][ACOMP] = alpha;;
}
break;
case GL_RGB:
/* replace RGB with RGB */
- if (table->Type == GL_FLOAT) {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- }
- else {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- rgba[i][RCOMP] = CHAN_TO_FLOAT(lut[jR * 3 + 0]);
- rgba[i][GCOMP] = CHAN_TO_FLOAT(lut[jG * 3 + 1]);
- rgba[i][BCOMP] = CHAN_TO_FLOAT(lut[jB * 3 + 2]);
- }
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ GLint jB = IROUND(rgba[i][BCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ jB = CLAMP(jB, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ rgba[i][BCOMP] = lut[jB * 3 + 2];
}
break;
case GL_RGBA:
/* replace RGBA with RGBA */
- if (table->Type == GL_FLOAT) {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- jA = CLAMP(jA, 0, max);
- rgba[i][RCOMP] = lut[jR * 4 + 0];
- rgba[i][GCOMP] = lut[jG * 4 + 1];
- rgba[i][BCOMP] = lut[jB * 4 + 2];
- rgba[i][ACOMP] = lut[jA * 4 + 3];
- }
- }
- else {
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- jA = CLAMP(jA, 0, max);
- rgba[i][RCOMP] = CHAN_TO_FLOAT(lut[jR * 4 + 0]);
- rgba[i][GCOMP] = CHAN_TO_FLOAT(lut[jG * 4 + 1]);
- rgba[i][BCOMP] = CHAN_TO_FLOAT(lut[jB * 4 + 2]);
- rgba[i][ACOMP] = CHAN_TO_FLOAT(lut[jA * 4 + 3]);
- }
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ GLint jB = IROUND(rgba[i][BCOMP] * scale);
+ GLint jA = IROUND(rgba[i][ACOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ jB = CLAMP(jB, 0, max);
+ jA = CLAMP(jA, 0, max);
+ rgba[i][RCOMP] = lut[jR * 4 + 0];
+ rgba[i][GCOMP] = lut[jG * 4 + 1];
+ rgba[i][BCOMP] = lut[jB * 4 + 2];
+ rgba[i][ACOMP] = lut[jA * 4 + 3];
}
break;
default:
@@ -1376,361 +1264,147 @@ _mesa_lookup_rgba_float(const struct gl_color_table *table,
/**
- * Apply a color table lookup to an array of GLchan RGBA colors.
+ * Apply a color table lookup to an array of ubyte/RGBA colors.
*/
void
-_mesa_lookup_rgba_chan(const struct gl_color_table *table,
- GLuint n, GLchan rgba[][4])
+_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
+ GLuint n, GLubyte rgba[][4])
{
- if (!table->Table || table->Size == 0)
+ const GLubyte *lut = table->TableUB;
+ const GLfloat scale = (GLfloat) (table->Size - 1) / 255.0;
+ GLuint i;
+
+ if (!table->TableUB || table->Size == 0)
return;
switch (table->_BaseFormat) {
- case GL_INTENSITY:
- /* replace RGBA with I */
- if (table->Type == GL_FLOAT) {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLchan c;
- CLAMPED_FLOAT_TO_CHAN(c, lut[j]);
- rgba[i][RCOMP] = rgba[i][GCOMP] =
- rgba[i][BCOMP] = rgba[i][ACOMP] = c;
- }
- }
- else {
-#if CHAN_TYPE == GL_UNSIGNED_BYTE
- if (table->Size == 256) {
- /* common case */
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- const GLchan c = lut[rgba[i][RCOMP]];
- rgba[i][RCOMP] = rgba[i][GCOMP] =
- rgba[i][BCOMP] = rgba[i][ACOMP] = c;
- }
- }
- else
-#endif
- {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- rgba[i][RCOMP] = rgba[i][GCOMP] =
- rgba[i][BCOMP] = rgba[i][ACOMP] = lut[j];
- }
- }
- }
- break;
- case GL_LUMINANCE:
- /* replace RGB with L */
- if (table->Type == GL_FLOAT) {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLchan c;
- CLAMPED_FLOAT_TO_CHAN(c, lut[j]);
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = c;
- }
+ case GL_INTENSITY:
+ /* replace RGBA with I */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ const GLubyte c = lut[rgba[i][RCOMP]];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = c;
}
- else {
-#if CHAN_TYPE == GL_UNSIGNED_BYTE
- if (table->Size == 256) {
- /* common case */
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- const GLchan c = lut[rgba[i][RCOMP]];
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = c;
- }
- }
- else
-#endif
- {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = lut[j];
- }
- }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = lut[j];
}
- break;
- case GL_ALPHA:
- /* replace A with A */
- if (table->Type == GL_FLOAT) {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- GLchan c;
- CLAMPED_FLOAT_TO_CHAN(c, lut[j]);
- rgba[i][ACOMP] = c;
- }
+ }
+ break;
+ case GL_LUMINANCE:
+ /* replace RGB with L */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ const GLubyte c = lut[rgba[i][RCOMP]];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = c;
}
- else {
-#if CHAN_TYPE == GL_UNSIGNED_BYTE
- if (table->Size == 256) {
- /* common case */
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][ACOMP] = lut[rgba[i][ACOMP]];
- }
- }
- else
-#endif
- {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = lut[j];
- }
- }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = lut[j];
}
- break;
- case GL_LUMINANCE_ALPHA:
- /* replace RGBA with LLLA */
- if (table->Type == GL_FLOAT) {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- GLchan luminance, alpha;
- CLAMPED_FLOAT_TO_CHAN(luminance, lut[jL * 2 + 0]);
- CLAMPED_FLOAT_TO_CHAN(alpha, lut[jA * 2 + 1]);
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;;
- }
+ }
+ break;
+ case GL_ALPHA:
+ /* replace A with A */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][ACOMP] = lut[rgba[i][ACOMP]];
}
- else {
-#if CHAN_TYPE == GL_UNSIGNED_BYTE
- if (table->Size == 256) {
- /* common case */
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLchan l = lut[rgba[i][RCOMP] * 2 + 0];
- GLchan a = lut[rgba[i][ACOMP] * 2 + 1];;
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = l;
- rgba[i][ACOMP] = a;
- }
- }
- else
-#endif
- {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- GLchan luminance = lut[jL * 2 + 0];
- GLchan alpha = lut[jA * 2 + 1];
- rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;
- }
- }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ rgba[i][ACOMP] = lut[j];
}
- break;
- case GL_RGB:
- /* replace RGB with RGB */
- if (table->Type == GL_FLOAT) {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 3 + 0]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 3 + 1]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 3 + 2]);
- }
+ }
+ break;
+ case GL_LUMINANCE_ALPHA:
+ /* replace RGBA with LLLA */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ GLubyte l = lut[rgba[i][RCOMP] * 2 + 0];
+ GLubyte a = lut[rgba[i][ACOMP] * 2 + 1];;
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = l;
+ rgba[i][ACOMP] = a;
}
- else {
-#if CHAN_TYPE == GL_UNSIGNED_BYTE
- if (table->Size == 256) {
- /* common case */
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 3 + 0];
- rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 3 + 1];
- rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 3 + 2];
- }
- }
- else
-#endif
- {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ GLubyte luminance = lut[jL * 2 + 0];
+ GLubyte alpha = lut[jA * 2 + 1];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = luminance;
+ rgba[i][ACOMP] = alpha;
}
- break;
- case GL_RGBA:
- /* replace RGBA with RGBA */
- if (table->Type == GL_FLOAT) {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
- }
+ }
+ break;
+ case GL_RGB:
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 3 + 0];
+ rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 3 + 1];
+ rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 3 + 2];
}
- else {
-#if CHAN_TYPE == GL_UNSIGNED_BYTE
- if (table->Size == 256) {
- /* common case */
- const GLchan *lut = (const GLchan *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 4 + 0];
- rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 4 + 1];
- rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 4 + 2];
- rgba[i][ACOMP] = lut[rgba[i][ACOMP] * 4 + 3];
- }
- }
- else
-#endif
- {
- const GLfloat scale = (GLfloat) (table->Size - 1) / CHAN_MAXF;
- const GLfloat *lut = (const GLfloat *) table->Table;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
- }
- }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
+ GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ rgba[i][BCOMP] = lut[jB * 3 + 2];
}
- break;
- default:
- _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_chan");
- return;
- }
-}
-
-
-
-/*
- * Apply color index shift and offset to an array of pixels.
- */
-void
-_mesa_shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] )
-{
- GLint shift = ctx->Pixel.IndexShift;
- GLint offset = ctx->Pixel.IndexOffset;
- GLuint i;
- if (shift > 0) {
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] << shift) + offset;
}
- }
- else if (shift < 0) {
- shift = -shift;
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] >> shift) + offset;
+ break;
+ case GL_RGBA:
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 4 + 0];
+ rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 4 + 1];
+ rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 4 + 2];
+ rgba[i][ACOMP] = lut[rgba[i][ACOMP] * 4 + 3];
+ }
}
- }
- else {
- for (i=0;i<n;i++) {
- indexes[i] = indexes[i] + offset;
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
+ GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
+ GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
+ }
}
+ break;
+ default:
+ _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_chan");
+ return;
}
}
-/*
- * Apply color index mapping to color indexes.
- */
-void
-_mesa_map_ci( const GLcontext *ctx, GLuint n, GLuint index[] )
-{
- const GLuint mask = ctx->Pixel.MapItoIsize - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- const GLuint j = index[i] & mask;
- index[i] = IROUND(ctx->Pixel.MapItoI[j]);
- }
-}
-
-
-/*
- * Map color indexes to rgba values.
- */
-void
-_mesa_map_ci_to_rgba_chan( const GLcontext *ctx, GLuint n,
- const GLuint index[], GLchan rgba[][4] )
-{
-#if CHAN_BITS == 8
- GLuint rmask = ctx->Pixel.MapItoRsize - 1;
- GLuint gmask = ctx->Pixel.MapItoGsize - 1;
- GLuint bmask = ctx->Pixel.MapItoBsize - 1;
- GLuint amask = ctx->Pixel.MapItoAsize - 1;
- const GLubyte *rMap = ctx->Pixel.MapItoR8;
- const GLubyte *gMap = ctx->Pixel.MapItoG8;
- const GLubyte *bMap = ctx->Pixel.MapItoB8;
- const GLubyte *aMap = ctx->Pixel.MapItoA8;
- GLuint i;
- for (i=0;i<n;i++) {
- rgba[i][RCOMP] = rMap[index[i] & rmask];
- rgba[i][GCOMP] = gMap[index[i] & gmask];
- rgba[i][BCOMP] = bMap[index[i] & bmask];
- rgba[i][ACOMP] = aMap[index[i] & amask];
- }
-#else
- GLuint rmask = ctx->Pixel.MapItoRsize - 1;
- GLuint gmask = ctx->Pixel.MapItoGsize - 1;
- GLuint bmask = ctx->Pixel.MapItoBsize - 1;
- GLuint amask = ctx->Pixel.MapItoAsize - 1;
- const GLfloat *rMap = ctx->Pixel.MapItoR;
- const GLfloat *gMap = ctx->Pixel.MapItoG;
- const GLfloat *bMap = ctx->Pixel.MapItoB;
- const GLfloat *aMap = ctx->Pixel.MapItoA;
- GLuint i;
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], rMap[index[i] & rmask]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], gMap[index[i] & gmask]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], bMap[index[i] & bmask]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], aMap[index[i] & amask]);
- }
-#endif
-}
-
/*
* Map color indexes to float rgba values.
@@ -1757,14 +1431,13 @@ _mesa_map_ci_to_rgba( const GLcontext *ctx, GLuint n,
}
-/*
- * Map 8-bit color indexes to rgb values.
+/**
+ * Map ubyte color indexes to ubyte/RGBA values.
*/
void
-_mesa_map_ci8_to_rgba( const GLcontext *ctx, GLuint n, const GLubyte index[],
- GLchan rgba[][4] )
+_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[],
+ GLubyte rgba[][4])
{
-#if CHAN_BITS == 8
GLuint rmask = ctx->Pixel.MapItoRsize - 1;
GLuint gmask = ctx->Pixel.MapItoGsize - 1;
GLuint bmask = ctx->Pixel.MapItoBsize - 1;
@@ -1780,61 +1453,6 @@ _mesa_map_ci8_to_rgba( const GLcontext *ctx, GLuint n, const GLubyte index[],
rgba[i][BCOMP] = bMap[index[i] & bmask];
rgba[i][ACOMP] = aMap[index[i] & amask];
}
-#else
- GLuint rmask = ctx->Pixel.MapItoRsize - 1;
- GLuint gmask = ctx->Pixel.MapItoGsize - 1;
- GLuint bmask = ctx->Pixel.MapItoBsize - 1;
- GLuint amask = ctx->Pixel.MapItoAsize - 1;
- const GLfloat *rMap = ctx->Pixel.MapItoR;
- const GLfloat *gMap = ctx->Pixel.MapItoG;
- const GLfloat *bMap = ctx->Pixel.MapItoB;
- const GLfloat *aMap = ctx->Pixel.MapItoA;
- GLuint i;
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], rMap[index[i] & rmask]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], gMap[index[i] & gmask]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], bMap[index[i] & bmask]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], aMap[index[i] & amask]);
- }
-#endif
-}
-
-
-void
-_mesa_shift_and_offset_stencil( const GLcontext *ctx, GLuint n,
- GLstencil stencil[] )
-{
- GLuint i;
- GLint shift = ctx->Pixel.IndexShift;
- GLint offset = ctx->Pixel.IndexOffset;
- if (shift > 0) {
- for (i=0;i<n;i++) {
- stencil[i] = (stencil[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i=0;i<n;i++) {
- stencil[i] = (stencil[i] >> shift) + offset;
- }
- }
- else {
- for (i=0;i<n;i++) {
- stencil[i] = stencil[i] + offset;
- }
- }
-
-}
-
-
-void
-_mesa_map_stencil( const GLcontext *ctx, GLuint n, GLstencil stencil[] )
-{
- GLuint mask = ctx->Pixel.MapStoSsize - 1;
- GLuint i;
- for (i=0;i<n;i++) {
- stencil[i] = ctx->Pixel.MapStoS[ stencil[i] & mask ];
- }
}
@@ -1852,52 +1470,6 @@ _mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n,
}
-/*
- * This function converts an array of GLchan colors to GLfloat colors.
- * Most importantly, it undoes the non-uniform quantization of pixel
- * values introduced when we convert shallow (< 8 bit) pixel values
- * to GLubytes in the ctx->Driver.ReadRGBASpan() functions.
- * This fixes a number of OpenGL conformance failures when running on
- * 16bpp displays, for example.
- */
-void
-_mesa_chan_to_float_span(const GLcontext *ctx, GLuint n,
- CONST GLchan rgba[][4], GLfloat rgbaf[][4])
-{
-#if CHAN_TYPE == GL_FLOAT
- MEMCPY(rgbaf, rgba, n * 4 * sizeof(GLfloat));
-#else
- const GLuint rShift = CHAN_BITS - ctx->Visual.redBits;
- const GLuint gShift = CHAN_BITS - ctx->Visual.greenBits;
- const GLuint bShift = CHAN_BITS - ctx->Visual.blueBits;
- GLuint aShift;
- const GLfloat rScale = 1.0F / (GLfloat) ((1 << ctx->Visual.redBits ) - 1);
- const GLfloat gScale = 1.0F / (GLfloat) ((1 << ctx->Visual.greenBits) - 1);
- const GLfloat bScale = 1.0F / (GLfloat) ((1 << ctx->Visual.blueBits ) - 1);
- GLfloat aScale;
- GLuint i;
-
- if (ctx->Visual.alphaBits > 0) {
- aShift = CHAN_BITS - ctx->Visual.alphaBits;
- aScale = 1.0F / (GLfloat) ((1 << ctx->Visual.alphaBits) - 1);
- }
- else {
- aShift = 0;
- aScale = 1.0F / CHAN_MAXF;
- }
-
- for (i = 0; i < n; i++) {
- const GLint r = rgba[i][RCOMP] >> rShift;
- const GLint g = rgba[i][GCOMP] >> gShift;
- const GLint b = rgba[i][BCOMP] >> bShift;
- const GLint a = rgba[i][ACOMP] >> aShift;
- rgbaf[i][RCOMP] = (GLfloat) r * rScale;
- rgbaf[i][GCOMP] = (GLfloat) g * gScale;
- rgbaf[i][BCOMP] = (GLfloat) b * bScale;
- rgbaf[i][ACOMP] = (GLfloat) a * aScale;
- }
-#endif
-}
/**********************************************************************/
/***** State Management *****/
diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h
index 161990024b9..09155cfd70d 100644
--- a/src/mesa/main/pixel.h
+++ b/src/mesa/main/pixel.h
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -98,23 +98,8 @@ _mesa_lookup_rgba_float(const struct gl_color_table *table,
GLuint n, GLfloat rgba[][4]);
extern void
-_mesa_lookup_rgba_chan(const struct gl_color_table *table,
- GLuint n, GLchan rgba[][4]);
-
-
-extern void
-_mesa_shift_and_offset_ci(const GLcontext *ctx, GLuint n,
- GLuint indexes[]);
-
-
-extern void
-_mesa_map_ci(const GLcontext *ctx, GLuint n, GLuint index[]);
-
-
-extern void
-_mesa_map_ci_to_rgba_chan(const GLcontext *ctx,
- GLuint n, const GLuint index[],
- GLchan rgba[][4]);
+_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
+ GLuint n, GLubyte rgba[][4]);
extern void
@@ -123,18 +108,8 @@ _mesa_map_ci_to_rgba(const GLcontext *ctx,
extern void
-_mesa_map_ci8_to_rgba(const GLcontext *ctx,
- GLuint n, const GLubyte index[],
- GLchan rgba[][4]);
-
-
-extern void
-_mesa_shift_and_offset_stencil(const GLcontext *ctx, GLuint n,
- GLstencil indexes[]);
-
-
-extern void
-_mesa_map_stencil(const GLcontext *ctx, GLuint n, GLstencil index[]);
+_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[],
+ GLubyte rgba[][4]);
extern void
@@ -142,11 +117,6 @@ _mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n,
GLfloat depthValues[]);
-extern void
-_mesa_chan_to_float_span(const GLcontext *ctx, GLuint n,
- CONST GLchan rgba[][4], GLfloat rgbaf[][4]);
-
-
extern void
_mesa_update_pixel( GLcontext *ctx, GLuint newstate );
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 4f490db724f..ddf2ac51d3b 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -994,6 +994,7 @@ void _mesa_init_rastpos( GLcontext * ctx )
ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 );
ctx->Current.RasterDistance = 0.0;
ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
+ ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
ctx->Current.RasterIndex = 1.0;
for (i=0; i<MAX_TEXTURE_UNITS; i++)
ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index b40a5dc5517..e62fbe47d15 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -304,7 +304,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_GenTextures(exec, _mesa_GenTextures);
#if _HAVE_FULL_GL
SET_AreTexturesResident(exec, _mesa_AreTexturesResident);
- SET_AreTexturesResidentEXT(exec, _mesa_AreTexturesResident);
SET_ColorPointer(exec, _mesa_ColorPointer);
SET_CopyTexImage1D(exec, _mesa_CopyTexImage1D);
SET_CopyTexImage2D(exec, _mesa_CopyTexImage2D);
@@ -313,12 +312,10 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_DisableClientState(exec, _mesa_DisableClientState);
SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer);
SET_EnableClientState(exec, _mesa_EnableClientState);
- SET_GenTexturesEXT(exec, _mesa_GenTextures);
SET_GetPointerv(exec, _mesa_GetPointerv);
SET_IndexPointer(exec, _mesa_IndexPointer);
SET_InterleavedArrays(exec, _mesa_InterleavedArrays);
SET_IsTexture(exec, _mesa_IsTexture);
- SET_IsTextureEXT(exec, _mesa_IsTexture);
SET_NormalPointer(exec, _mesa_NormalPointer);
SET_PopClientAttrib(exec, _mesa_PopClientAttrib);
SET_PrioritizeTextures(exec, _mesa_PrioritizeTextures);
@@ -356,31 +353,18 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_CopyConvolutionFilter1D(exec, _mesa_CopyConvolutionFilter1D);
SET_CopyConvolutionFilter2D(exec, _mesa_CopyConvolutionFilter2D);
SET_GetColorTable(exec, _mesa_GetColorTable);
- SET_GetColorTableSGI(exec, _mesa_GetColorTable);
SET_GetColorTableParameterfv(exec, _mesa_GetColorTableParameterfv);
- SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
SET_GetColorTableParameteriv(exec, _mesa_GetColorTableParameteriv);
- SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
SET_GetConvolutionFilter(exec, _mesa_GetConvolutionFilter);
- SET_GetConvolutionFilterEXT(exec, _mesa_GetConvolutionFilter);
SET_GetConvolutionParameterfv(exec, _mesa_GetConvolutionParameterfv);
- SET_GetConvolutionParameterfvEXT(exec, _mesa_GetConvolutionParameterfv);
SET_GetConvolutionParameteriv(exec, _mesa_GetConvolutionParameteriv);
- SET_GetConvolutionParameterivEXT(exec, _mesa_GetConvolutionParameteriv);
SET_GetHistogram(exec, _mesa_GetHistogram);
- SET_GetHistogramEXT(exec, _mesa_GetHistogram);
SET_GetHistogramParameterfv(exec, _mesa_GetHistogramParameterfv);
- SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
SET_GetHistogramParameteriv(exec, _mesa_GetHistogramParameteriv);
- SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
SET_GetMinmax(exec, _mesa_GetMinmax);
- SET_GetMinmaxEXT(exec, _mesa_GetMinmax);
SET_GetMinmaxParameterfv(exec, _mesa_GetMinmaxParameterfv);
- SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv);
SET_GetMinmaxParameteriv(exec, _mesa_GetMinmaxParameteriv);
- SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
SET_GetSeparableFilter(exec, _mesa_GetSeparableFilter);
- SET_GetSeparableFilterEXT(exec, _mesa_GetSeparableFilter);
SET_Histogram(exec, _mesa_Histogram);
SET_Minmax(exec, _mesa_Minmax);
SET_ResetHistogram(exec, _mesa_ResetHistogram);
@@ -392,6 +376,32 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate);
SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate);
SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate);
+#if FEATURE_ARB_shader_objects
+ SET_AttachShader(exec, _mesa_AttachShader);
+ SET_CreateProgram(exec, _mesa_CreateProgram);
+ SET_CreateShader(exec, _mesa_CreateShader);
+ SET_DeleteProgram(exec, _mesa_DeleteProgram);
+ SET_DeleteShader(exec, _mesa_DeleteShader);
+ SET_DetachShader(exec, _mesa_DetachShader);
+ SET_GetAttachedShaders(exec, _mesa_GetAttachedShaders);
+ SET_GetProgramiv(exec, _mesa_GetProgramiv);
+ SET_GetProgramInfoLog(exec, _mesa_GetProgramInfoLog);
+ SET_GetShaderiv(exec, _mesa_GetShaderiv);
+ SET_GetShaderInfoLog(exec, _mesa_GetShaderInfoLog);
+ SET_IsProgram(exec, _mesa_IsProgram);
+ SET_IsShader(exec, _mesa_IsShader);
+#endif
+
+ /* OpenGL 2.1 */
+#if FEATURE_ARB_shader_objects
+ SET_UniformMatrix2x3fv(exec, _mesa_UniformMatrix2x3fv);
+ SET_UniformMatrix3x2fv(exec, _mesa_UniformMatrix3x2fv);
+ SET_UniformMatrix2x4fv(exec, _mesa_UniformMatrix2x4fv);
+ SET_UniformMatrix4x2fv(exec, _mesa_UniformMatrix4x2fv);
+ SET_UniformMatrix3x4fv(exec, _mesa_UniformMatrix3x4fv);
+ SET_UniformMatrix4x3fv(exec, _mesa_UniformMatrix4x3fv);
+#endif
+
/* 2. GL_EXT_blend_color */
#if 0
@@ -411,7 +421,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
#endif
/* 11. GL_EXT_histogram */
-#if _HAVE_FULL_GL
+#if 0
SET_GetHistogramEXT(exec, _mesa_GetHistogram);
SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
@@ -424,8 +434,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
#if 0
SET_ColorTableSGI(exec, _mesa_ColorTable);
SET_ColorSubTableSGI(exec, _mesa_ColorSubTable);
-#endif
-#if _HAVE_FULL_GL
SET_GetColorTableSGI(exec, _mesa_GetColorTable);
SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
@@ -525,7 +533,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_GetVertexAttribfvNV(exec, _mesa_GetVertexAttribfvNV);
SET_GetVertexAttribivNV(exec, _mesa_GetVertexAttribivNV);
SET_GetVertexAttribPointervNV(exec, _mesa_GetVertexAttribPointervNV);
- SET_IsProgramNV(exec, _mesa_IsProgram);
+ SET_IsProgramNV(exec, _mesa_IsProgramARB);
SET_LoadProgramNV(exec, _mesa_LoadProgramNV);
SET_ProgramParameter4dNV(exec, _mesa_ProgramParameter4dNV);
SET_ProgramParameter4dvNV(exec, _mesa_ProgramParameter4dvNV);
@@ -1001,9 +1009,7 @@ update_color(GLcontext *ctx)
/* This is needed to support 1.1's RGB logic ops AND
* 1.0's blending logicops.
*/
- ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled ||
- (ctx->Color.BlendEnabled &&
- ctx->Color.BlendEquationRGB == GL_LOGIC_OP));
+ ctx->Color._LogicOpEnabled = RGBA_LOGICOP_ENABLED(ctx);
}
@@ -1021,7 +1027,7 @@ update_color(GLcontext *ctx)
* _mesa_update_lighting() and _mesa_update_tnl_spaces().
*/
void
-_mesa_update_state( GLcontext *ctx )
+_mesa_update_state_locked( GLcontext *ctx )
{
GLbitfield new_state = ctx->NewState;
@@ -1102,4 +1108,17 @@ _mesa_update_state( GLcontext *ctx )
ctx->Array.NewState = 0;
}
+
+/* This is the usual entrypoint for state updates:
+ */
+void
+_mesa_update_state( GLcontext *ctx )
+{
+ _mesa_lock_context_textures(ctx);
+ _mesa_update_state_locked(ctx);
+ _mesa_unlock_context_textures(ctx);
+}
+
+
+
/*@}*/
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index 58cfcc41462..5240d4bf935 100644
--- a/src/mesa/main/state.h
+++ b/src/mesa/main/state.h
@@ -39,5 +39,11 @@ _mesa_init_exec_table(struct _glapi_table *exec);
extern void
_mesa_update_state( GLcontext *ctx );
+/* As above but can only be called between _mesa_lock_context_textures() and
+ * _mesa_unlock_context_textures().
+ */
+extern void
+_mesa_update_state_locked( GLcontext *ctx );
+
#endif
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c
index 9992ec9b6eb..ad71a81f6e0 100644
--- a/src/mesa/main/stencil.c
+++ b/src/mesa/main/stencil.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -38,6 +38,10 @@
*
* So either we advertise the GL_EXT_stencil_two_side extension, or OpenGL
* 2.0, but not both.
+ *
+ * Also, note that GL_ATI_separate_stencil is different as well:
+ * glStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, ...) vs.
+ * glStencilFuncSeparate(GLenum face, GLenum func, ...).
*/
@@ -406,17 +410,16 @@ _mesa_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
FLUSH_VERTICES(ctx, _NEW_STENCIL);
- if (face == GL_FRONT || face == GL_FRONT_AND_BACK) {
+ if (face != GL_BACK) {
ctx->Stencil.FailFunc[0] = fail;
ctx->Stencil.ZFailFunc[0] = zfail;
ctx->Stencil.ZPassFunc[0] = zpass;
}
- if (face == GL_BACK || face == GL_FRONT_AND_BACK) {
+ if (face != GL_FRONT) {
ctx->Stencil.FailFunc[1] = fail;
ctx->Stencil.ZFailFunc[1] = zfail;
ctx->Stencil.ZPassFunc[1] = zpass;
}
-
if (ctx->Driver.StencilOpSeparate) {
ctx->Driver.StencilOpSeparate(ctx, face, fail, zfail, zpass);
}
@@ -465,7 +468,6 @@ _mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
ctx->Stencil.Ref[1] = ref;
ctx->Stencil.ValueMask[1] = mask;
}
-
if (ctx->Driver.StencilFuncSeparate) {
ctx->Driver.StencilFuncSeparate(ctx, face, func, ref, mask);
}
@@ -486,13 +488,12 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask)
FLUSH_VERTICES(ctx, _NEW_STENCIL);
- if (face == GL_FRONT || face == GL_FRONT_AND_BACK) {
+ if (face != GL_BACK) {
ctx->Stencil.WriteMask[0] = mask;
}
- if (face == GL_BACK || face == GL_FRONT_AND_BACK) {
+ if (face != GL_FRONT) {
ctx->Stencil.WriteMask[1] = mask;
}
-
if (ctx->Driver.StencilMaskSeparate) {
ctx->Driver.StencilMaskSeparate(ctx, face, mask);
}
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index d5943080245..c44d594d683 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -34,6 +34,7 @@
#include "colormac.h"
#include "context.h"
#include "image.h"
+#include "mipmap.h"
#include "texcompress.h"
#include "texformat.h"
#include "texstore.h"
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 18180e12eaf..2ac2c80a082 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -35,6 +35,7 @@
#include "context.h"
#include "convolve.h"
#include "image.h"
+#include "mipmap.h"
#include "texcompress.h"
#include "texformat.h"
#include "texstore.h"
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 3ccc8a8df75..99b703de4a5 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -48,6 +48,8 @@
#ifdef __MINGW32__
#define DXTN_LIBNAME "dxtn.dll"
+#define RTLD_LAZY 0
+#define RTLD_GLOBAL 0
#elif defined(__DJGPP__)
#define DXTN_LIBNAME "dxtn.dxe"
#else
@@ -104,7 +106,7 @@ _mesa_dlsym(void *handle, const char *fname)
{
#if USE_EXTERNAL_DXTN_LIB
#ifdef __MINGW32__
- return (GenericFunc) GetProcAddress(handle, fname)
+ return (GenericFunc) GetProcAddress(handle, fname);
#elif defined(__DJGPP__)
/* need '_' prefix on symbol names */
char fname2[1000];
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 5f798cc7df4..c99ff5cdc46 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -33,7 +33,11 @@
#include "shader/program.h"
#include "shader/program_instruction.h"
-#define MAX_INSTRUCTIONS 100
+/**
+ * According to Glean's texCombine test, no more than 21 instructions
+ * are needed. Allow a few extra just in case.
+ */
+#define MAX_INSTRUCTIONS 24
#define DISASSEM (MESA_VERBOSE & VERBOSE_DISASSEM)
@@ -474,7 +478,7 @@ emit_op(struct texenv_fragment_program *p,
GLuint nr = p->program->Base.NumInstructions++;
struct prog_instruction *inst = &p->program->Base.Instructions[nr];
- _mesa_init_instruction(inst);
+ _mesa_init_instructions(inst, 1);
inst->Opcode = op;
emit_arg( &inst->SrcReg[0], src0 );
@@ -988,9 +992,10 @@ load_texunit_sources( struct texenv_fragment_program *p, int unit )
* current texture env/combine mode.
*/
static void
-create_new_program(struct state_key *key, GLcontext *ctx,
+create_new_program(GLcontext *ctx, struct state_key *key,
struct gl_fragment_program *program)
{
+ struct prog_instruction instBuffer[MAX_INSTRUCTIONS];
struct texenv_fragment_program p;
GLuint unit;
struct ureg cf, out;
@@ -1000,18 +1005,19 @@ create_new_program(struct state_key *key, GLcontext *ctx,
p.state = key;
p.program = program;
- p.program->Base.Instructions =
- (struct prog_instruction*) _mesa_malloc(sizeof(struct prog_instruction) * MAX_INSTRUCTIONS);
- p.program->Base.NumInstructions = 0;
+ /* During code generation, use locally-allocated instruction buffer,
+ * then alloc dynamic storage below.
+ */
+ p.program->Base.Instructions = instBuffer;
p.program->Base.Target = GL_FRAGMENT_PROGRAM_ARB;
p.program->NumTexIndirections = 1; /* correct? */
p.program->NumTexInstructions = 0;
p.program->NumAluInstructions = 0;
p.program->Base.String = 0;
p.program->Base.NumInstructions =
- p.program->Base.NumTemporaries =
- p.program->Base.NumParameters =
- p.program->Base.NumAttributes = p.program->Base.NumAddressRegs = 0;
+ p.program->Base.NumTemporaries =
+ p.program->Base.NumParameters =
+ p.program->Base.NumAttributes = p.program->Base.NumAddressRegs = 0;
p.program->Base.Parameters = _mesa_new_parameter_list();
p.program->Base.InputsRead = 0;
@@ -1088,17 +1094,28 @@ create_new_program(struct state_key *key, GLcontext *ctx,
ASSERT(p.program->Base.NumInstructions <= MAX_INSTRUCTIONS);
+ /* Allocate final instruction array */
+ program->Base.Instructions
+ = _mesa_alloc_instructions(program->Base.NumInstructions);
+ if (!program->Base.Instructions) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY,
+ "generating tex env program");
+ return;
+ }
+ _mesa_memcpy(program->Base.Instructions, instBuffer,
+ sizeof(struct prog_instruction)
+ * program->Base.NumInstructions);
+
/* Notify driver the fragment program has (actually) changed.
*/
- if (ctx->Driver.ProgramStringNotify || DISASSEM) {
- if (ctx->Driver.ProgramStringNotify)
- ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_PROGRAM_ARB,
- &p.program->Base );
-
- if (DISASSEM) {
- _mesa_print_program(&p.program->Base);
- _mesa_printf("\n");
- }
+ if (ctx->Driver.ProgramStringNotify) {
+ ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_PROGRAM_ARB,
+ &p.program->Base );
+ }
+
+ if (DISASSEM) {
+ _mesa_print_program(&p.program->Base);
+ _mesa_printf("\n");
}
}
@@ -1225,7 +1242,7 @@ void _mesa_UpdateTexEnvProgram( GLcontext *ctx )
(struct gl_fragment_program *)
ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
- create_new_program(&key, ctx, ctx->_TexEnvProgram);
+ create_new_program(ctx, &key, ctx->_TexEnvProgram);
cache_item(&ctx->Texture.env_fp_cache, hash, &key, ctx->_TexEnvProgram);
} else {
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index 0d3519188e2..99785da1a0a 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -1060,6 +1060,7 @@ static void FETCH(ci8)( const struct gl_texture_image *texImage,
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
const struct gl_color_table *palette;
+ GLubyte texelUB[4];
GLuint index;
GET_CURRENT_CONTEXT(ctx);
@@ -1075,91 +1076,61 @@ static void FETCH(ci8)( const struct gl_texture_image *texImage,
/* Mask the index against size of palette to avoid going out of bounds */
index = (*src) & (palette->Size - 1);
- if (palette->Type == GL_FLOAT) {
- const GLfloat *ftable = (const GLfloat *) palette->Table;
+ {
+ const GLubyte *table = palette->TableUB;
switch (palette->_BaseFormat) {
case GL_ALPHA:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = 0;
- texel[ACOMP] = (GLchan) (ftable[index] * CHAN_MAX);
- return;
+ texelUB[RCOMP] =
+ texelUB[GCOMP] =
+ texelUB[BCOMP] = 0;
+ texelUB[ACOMP] = table[index];
+ break;;
case GL_LUMINANCE:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = (GLchan) (ftable[index] * CHAN_MAX);
- texel[ACOMP] = CHAN_MAX;
+ texelUB[RCOMP] =
+ texelUB[GCOMP] =
+ texelUB[BCOMP] = table[index];
+ texelUB[ACOMP] = 255;
break;
case GL_INTENSITY:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] =
- texel[ACOMP] = ftable[index] * CHAN_MAX;
- return;
+ texelUB[RCOMP] =
+ texelUB[GCOMP] =
+ texelUB[BCOMP] =
+ texelUB[ACOMP] = table[index];
+ break;;
case GL_LUMINANCE_ALPHA:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = (GLchan) (ftable[index * 2 + 0] * CHAN_MAX);
- texel[ACOMP] = (GLchan) (ftable[index * 2 + 1] * CHAN_MAX);
- return;
+ texelUB[RCOMP] =
+ texelUB[GCOMP] =
+ texelUB[BCOMP] = table[index * 2 + 0];
+ texelUB[ACOMP] = table[index * 2 + 1];
+ break;;
case GL_RGB:
- texel[RCOMP] = (GLchan) (ftable[index * 3 + 0] * CHAN_MAX);
- texel[GCOMP] = (GLchan) (ftable[index * 3 + 1] * CHAN_MAX);
- texel[BCOMP] = (GLchan) (ftable[index * 3 + 2] * CHAN_MAX);
- texel[ACOMP] = CHAN_MAX;
- return;
+ texelUB[RCOMP] = table[index * 3 + 0];
+ texelUB[GCOMP] = table[index * 3 + 1];
+ texelUB[BCOMP] = table[index * 3 + 2];
+ texelUB[ACOMP] = 255;
+ break;;
case GL_RGBA:
- texel[RCOMP] = (GLchan) (ftable[index * 4 + 0] * CHAN_MAX);
- texel[GCOMP] = (GLchan) (ftable[index * 4 + 1] * CHAN_MAX);
- texel[BCOMP] = (GLchan) (ftable[index * 4 + 2] * CHAN_MAX);
- texel[ACOMP] = (GLchan) (ftable[index * 4 + 3] * CHAN_MAX);
- return;
- default:
- _mesa_problem(ctx, "Bad palette format in fetch_texel_ci8");
- }
- }
- else {
- const GLchan *table = (const GLchan *) palette->Table;
- switch (palette->_BaseFormat) {
- case GL_ALPHA:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = 0;
- texel[ACOMP] = table[index];
- return;
- case GL_LUMINANCE:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = table[index];
- texel[ACOMP] = CHAN_MAX;
- break;
- case GL_INTENSITY:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] =
- texel[ACOMP] = table[index];
- return;
- case GL_LUMINANCE_ALPHA:
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = table[index * 2 + 0];
- texel[ACOMP] = table[index * 2 + 1];
- return;
- case GL_RGB:
- texel[RCOMP] = table[index * 3 + 0];
- texel[GCOMP] = table[index * 3 + 1];
- texel[BCOMP] = table[index * 3 + 2];
- texel[ACOMP] = CHAN_MAX;
- return;
- case GL_RGBA:
- texel[RCOMP] = table[index * 4 + 0];
- texel[GCOMP] = table[index * 4 + 1];
- texel[BCOMP] = table[index * 4 + 2];
- texel[ACOMP] = table[index * 4 + 3];
- return;
+ texelUB[RCOMP] = table[index * 4 + 0];
+ texelUB[GCOMP] = table[index * 4 + 1];
+ texelUB[BCOMP] = table[index * 4 + 2];
+ texelUB[ACOMP] = table[index * 4 + 3];
+ break;;
default:
_mesa_problem(ctx, "Bad palette format in fetch_texel_ci8");
}
+#if CHAN_TYPE == GL_UNSIGNED_BYTE
+ COPY_4UBV(texel, texelUB);
+#elif CHAN_TYPE == GL_UNSIGNED_SHORT
+ texel[0] = UBYTE_TO_USHORT(texelUB[0]);
+ texel[1] = UBYTE_TO_USHORT(texelUB[1]);
+ texel[2] = UBYTE_TO_USHORT(texelUB[2]);
+ texel[3] = UBYTE_TO_USHORT(texelUB[3]);
+#else
+ texel[0] = UBYTE_TO_FLOAT(texelUB[0]);
+ texel[1] = UBYTE_TO_FLOAT(texelUB[1]);
+ texel[2] = UBYTE_TO_FLOAT(texelUB[2]);
+ texel[3] = UBYTE_TO_FLOAT(texelUB[3]);
+#endif
}
}
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 14024fec047..543d6efc984 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -73,11 +73,11 @@ _mesa_free_texmemory(void *m)
#if 0
static void PrintTexture(GLcontext *ctx, const struct gl_texture_image *img)
{
-#if CHAN_TYPE == GL_FLOAT
- _mesa_problem(NULL, "PrintTexture doesn't support float channels");
+#if CHAN_TYPE != GL_UNSIGNED_BYTE
+ _mesa_problem(NULL, "PrintTexture not supported");
#else
GLuint i, j, c;
- const GLchan *data = (const GLchan *) img->Data;
+ const GLubyte *data = (const GLubyte *) img->Data;
if (!data) {
_mesa_printf("No texture data\n");
@@ -706,9 +706,12 @@ _mesa_free_texture_image_data(GLcontext *ctx,
void
_mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *texImage )
{
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
+ /* Free texImage->Data and/or any other driver-specific texture
+ * image storage.
+ */
+ ASSERT(ctx->Driver.FreeTexImageData);
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+
ASSERT(texImage->Data == NULL);
if (texImage->ImageOffsets)
_mesa_free(texImage->ImageOffsets);
@@ -801,24 +804,23 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
* \sa gl_texture_unit.
*/
struct gl_texture_image *
-_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
- GLenum target, GLint level)
+_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
+ GLenum target, GLint level)
{
- ASSERT(texUnit);
- ASSERT(level < MAX_TEXTURE_LEVELS);
+ ASSERT(texObj);
+
+ if (level < 0 || level >= MAX_TEXTURE_LEVELS)
+ return NULL;
+
switch (target) {
case GL_TEXTURE_1D:
- return texUnit->Current1D->Image[0][level];
case GL_PROXY_TEXTURE_1D:
- return ctx->Texture.Proxy1D->Image[0][level];
case GL_TEXTURE_2D:
- return texUnit->Current2D->Image[0][level];
case GL_PROXY_TEXTURE_2D:
- return ctx->Texture.Proxy2D->Image[0][level];
case GL_TEXTURE_3D:
- return texUnit->Current3D->Image[0][level];
case GL_PROXY_TEXTURE_3D:
- return ctx->Texture.Proxy3D->Image[0][level];
+ return texObj->Image[0][level];
+
case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
@@ -828,33 +830,25 @@ _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
if (ctx->Extensions.ARB_texture_cube_map) {
GLuint face = ((GLuint) target -
(GLuint) GL_TEXTURE_CUBE_MAP_POSITIVE_X);
- return texUnit->CurrentCubeMap->Image[face][level];
+ return texObj->Image[face][level];
}
else
return NULL;
+
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
if (ctx->Extensions.ARB_texture_cube_map)
- return ctx->Texture.ProxyCubeMap->Image[0][level];
+ return texObj->Image[0][level];
else
return NULL;
+
case GL_TEXTURE_RECTANGLE_NV:
- if (ctx->Extensions.NV_texture_rectangle) {
- ASSERT(level == 0);
- return texUnit->CurrentRect->Image[0][level];
- }
- else {
- return NULL;
- }
case GL_PROXY_TEXTURE_RECTANGLE_NV:
- if (ctx->Extensions.NV_texture_rectangle) {
- ASSERT(level == 0);
- return ctx->Texture.ProxyRect->Image[0][level];
- }
- else {
+ if (ctx->Extensions.NV_texture_rectangle && level == 0)
+ return texObj->Image[0][level];
+ else
return NULL;
- }
+
default:
- _mesa_problem(ctx, "bad target in _mesa_select_tex_image()");
return NULL;
}
}
@@ -866,22 +860,25 @@ _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
* out of memory.
*/
struct gl_texture_image *
-_mesa_get_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj,
GLenum target, GLint level)
{
struct gl_texture_image *texImage;
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+
+ if (!texObj)
+ return NULL;
+
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (!texImage) {
- struct gl_texture_object *texObj;
texImage = ctx->Driver.NewTextureImage(ctx);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "texture image allocation");
return NULL;
}
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
- ASSERT(texObj);
+
_mesa_set_tex_image(texObj, target, level, texImage);
}
+
return texImage;
}
@@ -1584,9 +1581,6 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type )
{
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- struct gl_texture_image *destTex;
-
/* Check target */
if (dimensions == 1) {
if (target != GL_TEXTURE_1D) {
@@ -1596,14 +1590,13 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
}
else if (dimensions == 2) {
if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
- target <=GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) {
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) {
if (!ctx->Extensions.ARB_texture_cube_map) {
_mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" );
return GL_TRUE;
}
}
- else if (ctx->Extensions.NV_texture_rectangle &&
- target == GL_TEXTURE_RECTANGLE_NV) {
+ else if (target == GL_TEXTURE_RECTANGLE_NV) {
if (!ctx->Extensions.NV_texture_rectangle) {
_mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" );
return GL_TRUE;
@@ -1647,8 +1640,23 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
- destTex = _mesa_select_tex_image(ctx, texUnit, target, level);
+ if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glTexSubImage%dD(format or type)", dimensions);
+ return GL_TRUE;
+ }
+
+ return GL_FALSE;
+}
+static GLboolean
+subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
+ GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint width, GLint height, GLint depth,
+ GLenum format, GLenum type,
+ const struct gl_texture_image *destTex )
+{
if (!destTex) {
/* undefined image level */
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexSubImage%dD", dimensions);
@@ -1688,12 +1696,6 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
}
}
- if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glTexSubImage%dD(format or type)", dimensions);
- return GL_TRUE;
- }
-
#if FEATURE_EXT_texture_sRGB
if (destTex->InternalFormat == GL_COMPRESSED_SRGB_S3TC_DXT1_EXT ||
destTex->InternalFormat == GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT ||
@@ -1709,11 +1711,6 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
#endif
if (destTex->IsCompressed) {
- const struct gl_texture_unit *texUnit;
- const struct gl_texture_image *texImage;
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
-
if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) {
/* OK */
}
@@ -1735,12 +1732,12 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
/* size must be multiple of 4 or equal to whole texture size */
- if ((width & 3) && (GLuint) width != texImage->Width) {
+ if ((width & 3) && (GLuint) width != destTex->Width) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(width)", dimensions);
return GL_TRUE;
}
- if ((height & 3) && (GLuint) height != texImage->Height) {
+ if ((height & 3) && (GLuint) height != destTex->Height) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(width)", dimensions);
return GL_TRUE;
@@ -1781,6 +1778,11 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
/* Basic level check (more checking in ctx->Driver.TestProxyTexImage) */
if (level < 0 || level >= MAX_TEXTURE_LEVELS) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexImage%dD(level=%d)", dimensions, level);
+ return GL_TRUE;
+ }
+
/* Check that the source buffer is complete */
if (ctx->ReadBuffer->Name) {
_mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
@@ -1791,11 +1793,6 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
}
}
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glCopyTexImage%dD(level=%d)", dimensions, level);
- return GL_TRUE;
- }
-
/* Check border */
if (border < 0 || border > 1 ||
((target == GL_TEXTURE_RECTANGLE_NV ||
@@ -1945,11 +1942,8 @@ static GLboolean
copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height )
+ GLsizei width, GLsizei height)
{
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- struct gl_texture_image *teximage;
-
/* Check target */
/* Check that the source buffer is complete */
if (ctx->ReadBuffer->Name) {
@@ -2012,7 +2006,16 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
- teximage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ return GL_FALSE;
+}
+
+static GLboolean
+copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
+ GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height,
+ const struct gl_texture_image *teximage )
+{
if (!teximage) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexSubImage%dD(undefined texture level: %d)",
@@ -2186,59 +2189,66 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
if (!pixels)
return;
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- /* invalid mipmap level, not an error */
- return;
- }
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ /* invalid mipmap level, not an error */
+ goto out;
+ }
- /* Make sure the requested image format is compatible with the
- * texture's format. Note that a color index texture can be converted
- * to RGBA so that combo is allowed.
- */
- if (is_color_format(format)
- && !is_color_format(texImage->TexFormat->BaseFormat)
- && !is_index_format(texImage->TexFormat->BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
- return;
- }
- else if (is_index_format(format)
- && !is_index_format(texImage->TexFormat->BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
- return;
- }
- else if (is_depth_format(format)
- && !is_depth_format(texImage->TexFormat->BaseFormat)
- && !is_depthstencil_format(texImage->TexFormat->BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
- return;
- }
- else if (is_ycbcr_format(format)
- && !is_ycbcr_format(texImage->TexFormat->BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
- return;
- }
- else if (is_depthstencil_format(format)
- && !is_depthstencil_format(texImage->TexFormat->BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
- return;
- }
- if (ctx->Pack.BufferObj->Name) {
- /* packing texture image into a PBO */
- const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2;
- if (!_mesa_validate_pbo_access(dimensions, &ctx->Pack, texImage->Width,
- texImage->Height, texImage->Depth,
- format, type, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetTexImage(invalid PBO access)");
- return;
+ /* Make sure the requested image format is compatible with the
+ * texture's format. Note that a color index texture can be converted
+ * to RGBA so that combo is allowed.
+ */
+ if (is_color_format(format)
+ && !is_color_format(texImage->TexFormat->BaseFormat)
+ && !is_index_format(texImage->TexFormat->BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
+ goto out;
+ }
+ else if (is_index_format(format)
+ && !is_index_format(texImage->TexFormat->BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
+ goto out;
+ }
+ else if (is_depth_format(format)
+ && !is_depth_format(texImage->TexFormat->BaseFormat)
+ && !is_depthstencil_format(texImage->TexFormat->BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
+ goto out;
+ }
+ else if (is_ycbcr_format(format)
+ && !is_ycbcr_format(texImage->TexFormat->BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
+ goto out;
+ }
+ else if (is_depthstencil_format(format)
+ && !is_depthstencil_format(texImage->TexFormat->BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
+ goto out;
+ }
+
+ if (ctx->Pack.BufferObj->Name) {
+ /* packing texture image into a PBO */
+ const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2;
+ if (!_mesa_validate_pbo_access(dimensions, &ctx->Pack, texImage->Width,
+ texImage->Height, texImage->Depth,
+ format, type, pixels)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetTexImage(invalid PBO access)");
+ goto out;
+ }
}
- }
- /* typically, this will call _mesa_get_teximage() */
- ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels,
- texObj, texImage);
+ /* typically, this will call _mesa_get_teximage() */
+ ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels,
+ texObj, texImage);
+
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2301,40 +2311,47 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
return; /* error was recorded */
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
-
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, 1, 1,
- border, internalFormat);
-
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
- _mesa_update_state(ctx);
+ _mesa_update_state(ctx);
- ASSERT(ctx->Driver.TexImage1D);
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
- /* Give the texture to the driver! <pixels> may be null! */
- (*ctx->Driver.TexImage1D)(ctx, target, level, internalFormat,
- width, border, format, type, pixels,
- &ctx->Unpack, texObj, texImage);
+ ASSERT(texImage->Data == NULL);
- ASSERT(texImage->TexFormat);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ postConvWidth, 1, 1,
+ border, internalFormat);
+
+ ASSERT(ctx->Driver.TexImage1D);
- update_fbo_texture(ctx, texObj, face, level);
+ /* Give the texture to the driver! <pixels> may be null! */
+ (*ctx->Driver.TexImage1D)(ctx, target, level, internalFormat,
+ width, border, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
+
+ ASSERT(texImage->TexFormat);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_1D) {
/* Proxy texture: check for errors and update proxy state */
@@ -2396,39 +2413,46 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
return; /* error was recorded */
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
- border, internalFormat);
-
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
- _mesa_update_state(ctx);
-
- ASSERT(ctx->Driver.TexImage2D);
-
- /* Give the texture to the driver! <pixels> may be null! */
- (*ctx->Driver.TexImage2D)(ctx, target, level, internalFormat,
- width, height, border, format, type, pixels,
- &ctx->Unpack, texObj, texImage);
-
- ASSERT(texImage->TexFormat);
+ _mesa_update_state(ctx);
- update_fbo_texture(ctx, texObj, face, level);
-
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ postConvWidth, postConvHeight, 1,
+ border, internalFormat);
+
+ ASSERT(ctx->Driver.TexImage2D);
+
+ /* Give the texture to the driver! <pixels> may be null! */
+ (*ctx->Driver.TexImage2D)(ctx, target, level, internalFormat,
+ width, height, border, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
+
+ ASSERT(texImage->TexFormat);
+
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_2D ||
(target == GL_PROXY_TEXTURE_CUBE_MAP_ARB &&
@@ -2486,39 +2510,46 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
return; /* error was recorded */
}
+ if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
+ _mesa_update_state(ctx);
+
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- width, height, depth,
- border, internalFormat);
-
- if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
- _mesa_update_state(ctx);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ width, height, depth,
+ border, internalFormat);
- ASSERT(ctx->Driver.TexImage3D);
+ ASSERT(ctx->Driver.TexImage3D);
- /* Give the texture to the driver! <pixels> may be null! */
- (*ctx->Driver.TexImage3D)(ctx, target, level, internalFormat,
- width, height, depth, border, format, type,
- pixels, &ctx->Unpack, texObj, texImage);
+ /* Give the texture to the driver! <pixels> may be null! */
+ (*ctx->Driver.TexImage3D)(ctx, target, level, internalFormat,
+ width, height, depth, border, format, type,
+ pixels, &ctx->Unpack, texObj, texImage);
- ASSERT(texImage->TexFormat);
+ ASSERT(texImage->TexFormat);
- update_fbo_texture(ctx, texObj, face, level);
+ update_fbo_texture(ctx, texObj, face, level);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_3D) {
/* Proxy texture: check for errors and update proxy state */
@@ -2566,7 +2597,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
GLsizei postConvWidth = width;
struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
- struct gl_texture_image *texImage;
+ struct gl_texture_image *texImage = NULL;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2579,26 +2610,38 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
}
if (subtexture_error_check(ctx, 1, target, level, xoffset, 0, 0,
- postConvWidth, 1, 1, format, type)) {
+ postConvWidth, 1, 1, format, type)) {
return; /* error was detected */
}
+
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- assert(texImage);
+ assert(texObj);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- if (width == 0)
- return; /* no-op, not an error */
+ if (subtexture_error_check2(ctx, 1, target, level, xoffset, 0, 0,
+ postConvWidth, 1, 1, format, type, texImage)) {
+ goto out; /* error was detected */
+ }
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
+ if (width == 0)
+ goto out; /* no-op, not an error */
- ASSERT(ctx->Driver.TexSubImage1D);
- (*ctx->Driver.TexSubImage1D)(ctx, target, level, xoffset, width,
- format, type, pixels, &ctx->Unpack,
- texObj, texImage);
- ctx->NewState |= _NEW_TEXTURE;
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+
+ ASSERT(ctx->Driver.TexSubImage1D);
+ (*ctx->Driver.TexSubImage1D)(ctx, target, level, xoffset, width,
+ format, type, pixels, &ctx->Unpack,
+ texObj, texImage);
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2626,27 +2669,37 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
}
if (subtexture_error_check(ctx, 2, target, level, xoffset, yoffset, 0,
- postConvWidth, postConvHeight, 1, format, type)) {
+ postConvWidth, postConvHeight, 1, format, type)) {
return; /* error was detected */
}
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- assert(texImage);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- if (width == 0 || height == 0)
- return; /* no-op, not an error */
+ if (subtexture_error_check2(ctx, 2, target, level, xoffset, yoffset, 0,
+ postConvWidth, postConvHeight, 1, format, type,
+ texImage)) {
+ goto out; /* error was detected */
+ }
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
+ if (width == 0 || height == 0)
+ goto out; /* no-op, not an error */
- ASSERT(ctx->Driver.TexSubImage2D);
- (*ctx->Driver.TexSubImage2D)(ctx, target, level, xoffset, yoffset,
- width, height, format, type, pixels,
- &ctx->Unpack, texObj, texImage);
- ctx->NewState |= _NEW_TEXTURE;
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
+
+ ASSERT(ctx->Driver.TexSubImage2D);
+ (*ctx->Driver.TexSubImage2D)(ctx, target, level, xoffset, yoffset,
+ width, height, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2674,24 +2727,34 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- assert(texImage);
-
- if (width == 0 || height == 0 || height == 0)
- return; /* no-op, not an error */
-
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
- zoffset += texImage->Border;
-
- ASSERT(ctx->Driver.TexSubImage3D);
- (*ctx->Driver.TexSubImage3D)(ctx, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, type, pixels,
- &ctx->Unpack, texObj, texImage );
- ctx->NewState |= _NEW_TEXTURE;
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (subtexture_error_check2(ctx, 3, target, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, type, texImage)) {
+ goto out; /* error was detected */
+ }
+
+ if (width == 0 || height == 0 || height == 0)
+ goto out; /* no-op, not an error */
+
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
+ zoffset += texImage->Border;
+
+ ASSERT(ctx->Driver.TexSubImage3D);
+ (*ctx->Driver.TexSubImage3D)(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels,
+ &ctx->Unpack, texObj, texImage );
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2723,32 +2786,39 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1,
- border, internalFormat);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1,
+ border, internalFormat);
- ASSERT(ctx->Driver.CopyTexImage1D);
- (*ctx->Driver.CopyTexImage1D)(ctx, target, level, internalFormat,
- x, y, width, border);
+ ASSERT(ctx->Driver.CopyTexImage1D);
+ (*ctx->Driver.CopyTexImage1D)(ctx, target, level, internalFormat,
+ x, y, width, border);
- ASSERT(texImage->TexFormat);
+ ASSERT(texImage->TexFormat);
- update_fbo_texture(ctx, texObj, face, level);
+ update_fbo_texture(ctx, texObj, face, level);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2780,41 +2850,50 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
- border, internalFormat);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
- ASSERT(ctx->Driver.CopyTexImage2D);
- (*ctx->Driver.CopyTexImage2D)(ctx, target, level, internalFormat,
- x, y, width, height, border);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
- ASSERT(texImage->TexFormat);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ postConvWidth, postConvHeight, 1,
+ border, internalFormat);
+
+ ASSERT(ctx->Driver.CopyTexImage2D);
+ (*ctx->Driver.CopyTexImage2D)(ctx, target, level, internalFormat,
+ x, y, width, height, border);
+
+ ASSERT(texImage->TexFormat);
- update_fbo_texture(ctx, texObj, face, level);
+ update_fbo_texture(ctx, texObj, face, level);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
-
void GLAPIENTRY
_mesa_CopyTexSubImage1D( GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width )
{
struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width;
GET_CURRENT_CONTEXT(ctx);
@@ -2831,15 +2910,27 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
return;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- ASSERT(texImage);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
+ if (copytexsubimage_error_check2(ctx, 1, target, level,
+ xoffset, 0, 0, postConvWidth, 1,
+ texImage))
+ goto out;
+
+
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
- ASSERT(ctx->Driver.CopyTexSubImage1D);
- (*ctx->Driver.CopyTexSubImage1D)(ctx, target, level, xoffset, x, y, width);
- ctx->NewState |= _NEW_TEXTURE;
+ ASSERT(ctx->Driver.CopyTexSubImage1D);
+ (*ctx->Driver.CopyTexSubImage1D)(ctx, target, level, xoffset, x, y, width);
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2850,6 +2941,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
GLint x, GLint y, GLsizei width, GLsizei height )
{
struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width, postConvHeight = height;
GET_CURRENT_CONTEXT(ctx);
@@ -2866,17 +2958,27 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
return;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- ASSERT(texImage);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
+ if (copytexsubimage_error_check2(ctx, 2, target, level, xoffset, yoffset, 0,
+ postConvWidth, postConvHeight, texImage))
+ goto out;
- ASSERT(ctx->Driver.CopyTexSubImage2D);
- (*ctx->Driver.CopyTexSubImage2D)(ctx, target, level,
- xoffset, yoffset, x, y, width, height);
- ctx->NewState |= _NEW_TEXTURE;
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
+
+ ASSERT(ctx->Driver.CopyTexSubImage2D);
+ (*ctx->Driver.CopyTexSubImage2D)(ctx, target, level,
+ xoffset, yoffset, x, y, width, height);
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -2887,6 +2989,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
GLint x, GLint y, GLsizei width, GLsizei height )
{
struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width, postConvHeight = height;
GET_CURRENT_CONTEXT(ctx);
@@ -2903,19 +3006,30 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
return;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- ASSERT(texImage);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
- zoffset += texImage->Border;
+ if (copytexsubimage_error_check2(ctx, 3, target, level, xoffset, yoffset,
+ zoffset, postConvWidth, postConvHeight,
+ texImage))
+ goto out;
- ASSERT(ctx->Driver.CopyTexSubImage3D);
- (*ctx->Driver.CopyTexSubImage3D)(ctx, target, level,
- xoffset, yoffset, zoffset,
- x, y, width, height);
- ctx->NewState |= _NEW_TEXTURE;
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
+ zoffset += texImage->Border;
+
+ ASSERT(ctx->Driver.CopyTexSubImage3D);
+ (*ctx->Driver.CopyTexSubImage3D)(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height);
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -3136,28 +3250,35 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
- _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
- border, internalFormat);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
- ASSERT(ctx->Driver.CompressedTexImage1D);
- (*ctx->Driver.CompressedTexImage1D)(ctx, target, level,
- internalFormat, width, border,
- imageSize, data,
- texObj, texImage);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
+ border, internalFormat);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ ASSERT(ctx->Driver.CompressedTexImage1D);
+ (*ctx->Driver.CompressedTexImage1D)(ctx, target, level,
+ internalFormat, width, border,
+ imageSize, data,
+ texObj, texImage);
+
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_1D) {
/* Proxy texture: check for errors and update proxy state */
@@ -3179,11 +3300,18 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
else {
/* store the teximage parameters */
struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
- border, internalFormat);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
+ border, internalFormat);
+ }
+ _mesa_unlock_texture(ctx, texObj);
}
}
else {
@@ -3219,28 +3347,35 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
- _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
- border, internalFormat);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
- ASSERT(ctx->Driver.CompressedTexImage2D);
- (*ctx->Driver.CompressedTexImage2D)(ctx, target, level,
- internalFormat, width, height,
- border, imageSize, data,
- texObj, texImage);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ ASSERT(ctx->Driver.CompressedTexImage2D);
+ (*ctx->Driver.CompressedTexImage2D)(ctx, target, level,
+ internalFormat, width, height,
+ border, imageSize, data,
+ texObj, texImage);
+
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_2D ||
(target == GL_PROXY_TEXTURE_CUBE_MAP_ARB &&
@@ -3264,11 +3399,18 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
else {
/* store the teximage parameters */
struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
- border, internalFormat);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat);
+ }
+ _mesa_unlock_texture(ctx, texObj);
}
}
else {
@@ -3301,29 +3443,35 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_get_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3D");
- return;
- }
- else if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
-
- _mesa_init_teximage_fields(ctx, target, texImage, width, height, depth,
- border, internalFormat);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3D");
+ goto out;
+ }
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
- ASSERT(ctx->Driver.CompressedTexImage3D);
- (*ctx->Driver.CompressedTexImage3D)(ctx, target, level,
- internalFormat,
- width, height, depth,
- border, imageSize, data,
- texObj, texImage);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, depth,
+ border, internalFormat);
- /* state update */
- texObj->Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ ASSERT(ctx->Driver.CompressedTexImage3D);
+ (*ctx->Driver.CompressedTexImage3D)(ctx, target, level,
+ internalFormat,
+ width, height, depth,
+ border, imageSize, data,
+ texObj, texImage);
+
+ /* state update */
+ texObj->Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_3D) {
/* Proxy texture: check for errors and update proxy state */
@@ -3345,11 +3493,17 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
else {
/* store the teximage parameters */
struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- _mesa_init_teximage_fields(ctx, target, texImage, width, height,
- depth, border, internalFormat);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height,
+ depth, border, internalFormat);
+ }
+ _mesa_unlock_texture(ctx, texObj);
}
}
else {
@@ -3382,30 +3536,35 @@ _mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- assert(texImage);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ assert(texImage);
- if ((GLint) format != texImage->InternalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCompressedTexSubImage1D(format)");
- return;
- }
+ if ((GLint) format != texImage->InternalFormat) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCompressedTexSubImage1D(format)");
+ goto out;
+ }
- if ((width == 1 || width == 2) && (GLuint) width != texImage->Width) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage1D(width)");
- return;
- }
+ if ((width == 1 || width == 2) && (GLuint) width != texImage->Width) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage1D(width)");
+ goto out;
+ }
- if (width == 0)
- return; /* no-op, not an error */
+ if (width == 0)
+ goto out; /* no-op, not an error */
- if (ctx->Driver.CompressedTexSubImage1D) {
- (*ctx->Driver.CompressedTexSubImage1D)(ctx, target, level,
- xoffset, width,
- format, imageSize, data,
- texObj, texImage);
+ if (ctx->Driver.CompressedTexSubImage1D) {
+ (*ctx->Driver.CompressedTexSubImage1D)(ctx, target, level,
+ xoffset, width,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ ctx->NewState |= _NEW_TEXTURE;
}
- ctx->NewState |= _NEW_TEXTURE;
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -3434,31 +3593,36 @@ _mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- assert(texImage);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ assert(texImage);
- if ((GLint) format != texImage->InternalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCompressedTexSubImage2D(format)");
- return;
- }
+ if ((GLint) format != texImage->InternalFormat) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCompressedTexSubImage2D(format)");
+ goto out;
+ }
- if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) ||
- ((height == 1 || height == 2) && (GLuint) height != texImage->Height)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage2D(size)");
- return;
- }
+ if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) ||
+ ((height == 1 || height == 2) && (GLuint) height != texImage->Height)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage2D(size)");
+ goto out;
+ }
- if (width == 0 || height == 0)
- return; /* no-op, not an error */
+ if (width == 0 || height == 0)
+ goto out; /* no-op, not an error */
- if (ctx->Driver.CompressedTexSubImage2D) {
- (*ctx->Driver.CompressedTexSubImage2D)(ctx, target, level,
- xoffset, yoffset, width, height,
- format, imageSize, data,
- texObj, texImage);
+ if (ctx->Driver.CompressedTexSubImage2D) {
+ (*ctx->Driver.CompressedTexSubImage2D)(ctx, target, level,
+ xoffset, yoffset, width, height,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ ctx->NewState |= _NEW_TEXTURE;
}
- ctx->NewState |= _NEW_TEXTURE;
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -3486,33 +3650,38 @@ _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- assert(texImage);
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ assert(texImage);
- if ((GLint) format != texImage->InternalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCompressedTexSubImage3D(format)");
- return;
- }
+ if ((GLint) format != texImage->InternalFormat) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCompressedTexSubImage3D(format)");
+ goto out;
+ }
- if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) ||
- ((height == 1 || height == 2) && (GLuint) height != texImage->Height) ||
- ((depth == 1 || depth == 2) && (GLuint) depth != texImage->Depth)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage3D(size)");
- return;
- }
+ if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) ||
+ ((height == 1 || height == 2) && (GLuint) height != texImage->Height) ||
+ ((depth == 1 || depth == 2) && (GLuint) depth != texImage->Depth)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage3D(size)");
+ goto out;
+ }
- if (width == 0 || height == 0 || depth == 0)
- return; /* no-op, not an error */
+ if (width == 0 || height == 0 || depth == 0)
+ goto out; /* no-op, not an error */
- if (ctx->Driver.CompressedTexSubImage3D) {
- (*ctx->Driver.CompressedTexSubImage3D)(ctx, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, imageSize, data,
- texObj, texImage);
+ if (ctx->Driver.CompressedTexSubImage3D) {
+ (*ctx->Driver.CompressedTexSubImage3D)(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ ctx->NewState |= _NEW_TEXTURE;
}
- ctx->NewState |= _NEW_TEXTURE;
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -3520,12 +3689,13 @@ void GLAPIENTRY
_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
{
const struct gl_texture_unit *texUnit;
- const struct gl_texture_object *texObj;
+ struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLint maxLevels;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
if (!texObj) {
@@ -3546,18 +3716,24 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
return;
}
- texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- if (!texImage) {
- /* probably invalid mipmap level */
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)");
- return;
- }
- if (!texImage->IsCompressed) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetCompressedTexImageARB");
- return;
- }
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ /* probably invalid mipmap level */
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)");
+ goto out;
+ }
+
+ if (!texImage->IsCompressed) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetCompressedTexImageARB");
+ goto out;
+ }
- /* this typically calls _mesa_get_compressed_teximage() */
- ctx->Driver.GetCompressedTexImage(ctx, target, level, img, texObj,texImage);
+ /* this typically calls _mesa_get_compressed_teximage() */
+ ctx->Driver.GetCompressedTexImage(ctx, target, level, img, texObj,texImage);
+ }
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 410789fe046..68457f4728c 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -84,12 +84,12 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
extern struct gl_texture_image *
-_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
GLenum target, GLint level);
extern struct gl_texture_image *
-_mesa_get_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj,
GLenum target, GLint level);
@@ -106,6 +106,23 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
GLint internalFormat, GLenum format, GLenum type,
GLint width, GLint height, GLint depth, GLint border);
+
+/* Lock a texture for updating. See also _mesa_lock_context_textures().
+ */
+static INLINE void _mesa_lock_texture(GLcontext *ctx,
+ struct gl_texture_object *texObj)
+{
+ _glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
+ ctx->Shared->TextureStateStamp++;
+ (void) texObj;
+}
+
+static INLINE void _mesa_unlock_texture(GLcontext *ctx,
+ struct gl_texture_object *texObj)
+{
+ _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
+}
+
/*@}*/
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 8b42c2a712c..1d27cd3f7c6 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -697,7 +697,11 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
if (textures[i] > 0) {
struct gl_texture_object *delObj
= _mesa_lookup_texture(ctx, textures[i]);
+
if (delObj) {
+ GLboolean delete;
+
+ _mesa_lock_texture(ctx, delObj);
/* Check if texture is bound to any framebuffer objects.
* If so, unbind.
@@ -724,7 +728,14 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
* XXX all RefCount accesses should be protected by a mutex.
*/
delObj->RefCount--;
- if (delObj->RefCount == 0) {
+ delete = (delObj->RefCount == 0);
+ _mesa_unlock_texture(ctx, delObj);
+
+ /* We know that refcount went to zero above, so this is
+ * the only pointer left to delObj, so we don't have to
+ * worry about locking any more:
+ */
+ if (delete) {
ASSERT(delObj->Name != 0); /* Never delete default tex objs */
ASSERT(ctx->Driver.DeleteTexture);
(*ctx->Driver.DeleteTexture)(ctx, delObj);
@@ -1052,4 +1063,30 @@ _mesa_IsTexture( GLuint texture )
return t && t->Target;
}
+/* Simplest implementation of texture locking: Grab the a new mutex in
+ * the shared context. Examine the shared context state timestamp and
+ * if there has been a change, set the appropriate bits in
+ * ctx->NewState.
+ *
+ * See also _mesa_lock/unlock_texture in texobj.h
+ */
+void _mesa_lock_context_textures( GLcontext *ctx )
+{
+ _glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
+
+ if (ctx->Shared->TextureStateStamp != ctx->TextureStateTimestamp) {
+ ctx->NewState |= _NEW_TEXTURE;
+ ctx->TextureStateTimestamp = ctx->Shared->TextureStateStamp;
+ }
+}
+
+
+void _mesa_unlock_context_textures( GLcontext *ctx )
+{
+ assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
+}
+
/*@}*/
+
+
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index ac66ac69d3c..ec7cf8cd86e 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -61,6 +61,9 @@ extern void
_mesa_test_texobj_completeness( const GLcontext *ctx,
struct gl_texture_object *obj );
+extern void _mesa_unlock_context_textures( GLcontext *ctx );
+extern void _mesa_lock_context_textures( GLcontext *ctx );
+
/*@}*/
@@ -95,4 +98,5 @@ _mesa_IsTexture( GLuint texture );
/*@}*/
+
#endif
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 0687e5760c9..bcedcafe19e 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -144,6 +144,8 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
dst->Texture.Unit[i].Combine.ScaleShiftA = src->Texture.Unit[i].Combine.ScaleShiftA;
/* copy texture object bindings, not contents of texture objects */
+ _mesa_lock_context_textures(dst);
+
copy_texture_binding(src, &dst->Texture.Unit[i].Current1D,
src->Texture.Unit[i].Current1D);
copy_texture_binding(src, &dst->Texture.Unit[i].Current2D,
@@ -154,6 +156,8 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
src->Texture.Unit[i].CurrentCubeMap);
copy_texture_binding(src, &dst->Texture.Unit[i].CurrentRect,
src->Texture.Unit[i].CurrentRect);
+
+ _mesa_unlock_context_textures(dst);
}
}
@@ -1700,6 +1704,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
GLenum pname, GLint *params )
{
const struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
const struct gl_texture_image *img = NULL;
GLuint dimensions;
GLboolean isProxy;
@@ -1734,14 +1739,17 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
return;
}
- img = _mesa_select_tex_image(ctx, texUnit, target, level);
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ _mesa_lock_texture(ctx, texObj);
+
+ img = _mesa_select_tex_image(ctx, texObj, target, level);
if (!img || !img->TexFormat) {
/* undefined texture image */
if (pname == GL_TEXTURE_COMPONENTS)
*params = 1;
else
*params = 0;
- return;
+ goto out;
}
isProxy = _mesa_is_proxy_texture(target);
@@ -1749,37 +1757,37 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
switch (pname) {
case GL_TEXTURE_WIDTH:
*params = img->Width;
- return;
+ break;
case GL_TEXTURE_HEIGHT:
*params = img->Height;
- return;
+ break;
case GL_TEXTURE_DEPTH:
*params = img->Depth;
- return;
+ break;
case GL_TEXTURE_INTERNAL_FORMAT:
*params = img->InternalFormat;
- return;
+ break;
case GL_TEXTURE_BORDER:
*params = img->Border;
- return;
+ break;
case GL_TEXTURE_RED_SIZE:
if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA)
*params = img->TexFormat->RedBits;
else
*params = 0;
- return;
+ break;
case GL_TEXTURE_GREEN_SIZE:
if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA)
*params = img->TexFormat->GreenBits;
else
*params = 0;
- return;
+ break;
case GL_TEXTURE_BLUE_SIZE:
if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA)
*params = img->TexFormat->BlueBits;
else
*params = 0;
- return;
+ break;
case GL_TEXTURE_ALPHA_SIZE:
if (img->_BaseFormat == GL_ALPHA ||
img->_BaseFormat == GL_LUMINANCE_ALPHA ||
@@ -1787,7 +1795,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = img->TexFormat->AlphaBits;
else
*params = 0;
- return;
+ break;
case GL_TEXTURE_INTENSITY_SIZE:
if (img->_BaseFormat != GL_INTENSITY)
*params = 0;
@@ -1795,7 +1803,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = img->TexFormat->IntensityBits;
else /* intensity probably stored as rgb texture */
*params = MIN2(img->TexFormat->RedBits, img->TexFormat->GreenBits);
- return;
+ break;
case GL_TEXTURE_LUMINANCE_SIZE:
if (img->_BaseFormat != GL_LUMINANCE &&
img->_BaseFormat != GL_LUMINANCE_ALPHA)
@@ -1804,13 +1812,13 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = img->TexFormat->LuminanceBits;
else /* luminance probably stored as rgb texture */
*params = MIN2(img->TexFormat->RedBits, img->TexFormat->GreenBits);
- return;
+ break;
case GL_TEXTURE_INDEX_SIZE_EXT:
if (img->_BaseFormat == GL_COLOR_INDEX)
*params = img->TexFormat->IndexBits;
else
*params = 0;
- return;
+ break;
case GL_TEXTURE_DEPTH_SIZE_ARB:
if (ctx->Extensions.SGIX_depth_texture ||
ctx->Extensions.ARB_depth_texture)
@@ -1818,7 +1826,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
else
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
- return;
+ break;
case GL_TEXTURE_STENCIL_SIZE_EXT:
if (ctx->Extensions.EXT_packed_depth_stencil) {
*params = img->TexFormat->StencilBits;
@@ -1827,7 +1835,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
/* GL_ARB_texture_compression */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
@@ -1849,7 +1857,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_COMPRESSED:
if (ctx->Extensions.ARB_texture_compression) {
*params = (GLint) img->IsCompressed;
@@ -1858,7 +1866,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
/* GL_ARB_texture_float */
case GL_TEXTURE_RED_TYPE_ARB:
@@ -1869,7 +1877,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_GREEN_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
*params = img->TexFormat->GreenBits ? img->TexFormat->DataType : GL_NONE;
@@ -1878,7 +1886,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_BLUE_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
*params = img->TexFormat->BlueBits ? img->TexFormat->DataType : GL_NONE;
@@ -1887,7 +1895,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_ALPHA_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
*params = img->TexFormat->AlphaBits ? img->TexFormat->DataType : GL_NONE;
@@ -1896,7 +1904,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_LUMINANCE_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
*params = img->TexFormat->LuminanceBits ? img->TexFormat->DataType : GL_NONE;
@@ -1905,7 +1913,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_INTENSITY_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
*params = img->TexFormat->IntensityBits ? img->TexFormat->DataType : GL_NONE;
@@ -1914,7 +1922,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
case GL_TEXTURE_DEPTH_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
*params = img->TexFormat->DepthBits ? img->TexFormat->DataType : GL_NONE;
@@ -1923,12 +1931,15 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
- return;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
}
+
+ out:
+ _mesa_unlock_texture(ctx, texObj);
}
@@ -1938,6 +1949,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
{
struct gl_texture_unit *texUnit;
struct gl_texture_object *obj;
+ GLboolean error = GL_FALSE;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -1955,28 +1967,29 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
return;
}
+ _mesa_lock_texture(ctx, obj);
switch (pname) {
case GL_TEXTURE_MAG_FILTER:
*params = ENUM_TO_FLOAT(obj->MagFilter);
- return;
+ break;
case GL_TEXTURE_MIN_FILTER:
*params = ENUM_TO_FLOAT(obj->MinFilter);
- return;
+ break;
case GL_TEXTURE_WRAP_S:
*params = ENUM_TO_FLOAT(obj->WrapS);
- return;
+ break;
case GL_TEXTURE_WRAP_T:
*params = ENUM_TO_FLOAT(obj->WrapT);
- return;
+ break;
case GL_TEXTURE_WRAP_R:
*params = ENUM_TO_FLOAT(obj->WrapR);
- return;
+ break;
case GL_TEXTURE_BORDER_COLOR:
params[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F);
params[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F);
params[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F);
params[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F);
- return;
+ break;
case GL_TEXTURE_RESIDENT:
{
GLboolean resident;
@@ -1986,82 +1999,94 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
resident = GL_TRUE;
*params = ENUM_TO_FLOAT(resident);
}
- return;
+ break;
case GL_TEXTURE_PRIORITY:
*params = obj->Priority;
- return;
+ break;
case GL_TEXTURE_MIN_LOD:
*params = obj->MinLod;
- return;
+ break;
case GL_TEXTURE_MAX_LOD:
*params = obj->MaxLod;
- return;
+ break;
case GL_TEXTURE_BASE_LEVEL:
*params = (GLfloat) obj->BaseLevel;
- return;
+ break;
case GL_TEXTURE_MAX_LEVEL:
*params = (GLfloat) obj->MaxLevel;
- return;
+ break;
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
if (ctx->Extensions.EXT_texture_filter_anisotropic) {
*params = obj->MaxAnisotropy;
- return;
}
+ else
+ error = 1;
break;
case GL_TEXTURE_COMPARE_SGIX:
if (ctx->Extensions.SGIX_shadow) {
*params = (GLfloat) obj->CompareFlag;
- return;
}
+ else
+ error = 1;
break;
case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
if (ctx->Extensions.SGIX_shadow) {
*params = (GLfloat) obj->CompareOperator;
- return;
}
+ else
+ error = 1;
break;
case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
if (ctx->Extensions.SGIX_shadow_ambient) {
*params = obj->ShadowAmbient;
- return;
}
+ else
+ error = 1;
break;
case GL_GENERATE_MIPMAP_SGIS:
if (ctx->Extensions.SGIS_generate_mipmap) {
*params = (GLfloat) obj->GenerateMipmap;
- return;
}
+ else
+ error = 1;
break;
case GL_TEXTURE_COMPARE_MODE_ARB:
if (ctx->Extensions.ARB_shadow) {
*params = (GLfloat) obj->CompareMode;
- return;
}
+ else
+ error = 1;
break;
case GL_TEXTURE_COMPARE_FUNC_ARB:
if (ctx->Extensions.ARB_shadow) {
*params = (GLfloat) obj->CompareFunc;
- return;
}
+ else
+ error = 1;
break;
case GL_DEPTH_TEXTURE_MODE_ARB:
if (ctx->Extensions.ARB_depth_texture) {
*params = (GLfloat) obj->DepthMode;
- return;
}
+ else
+ error = 1;
break;
case GL_TEXTURE_LOD_BIAS:
if (ctx->Extensions.EXT_texture_lod_bias) {
*params = obj->LodBias;
- return;
}
+ else
+ error = 1;
break;
default:
- ; /* silence warnings */
+ error = 1;
+ break;
}
- /* If we get here, pname was an unrecognized enum */
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname=0x%x)",
- pname);
+ if (error)
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname=0x%x)",
+ pname);
+
+ _mesa_unlock_texture(ctx, obj);
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 7471934b49d..89563842c25 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -27,7 +27,7 @@
* Brian Paul
*/
-/*
+/**
* The GL texture image functions in teximage.c basically just do
* error checking and data structure allocation. They in turn call
* device driver functions which actually copy/convert/store the user's
@@ -58,16 +58,27 @@
#include "convolve.h"
#include "image.h"
#include "macros.h"
+#include "mipmap.h"
#include "imports.h"
#include "texcompress.h"
#include "texformat.h"
#include "teximage.h"
#include "texstore.h"
+#include "enums.h"
-static const GLint ZERO = 4, ONE = 5;
+enum {
+ ZERO = 4,
+ ONE = 5
+};
-static GLboolean can_swizzle(GLenum logicalBaseFormat)
+
+/**
+ * Return GL_TRUE if the given image format is one that be converted
+ * to another format by swizzling.
+ */
+static GLboolean
+can_swizzle(GLenum logicalBaseFormat)
{
switch (logicalBaseFormat) {
case GL_RGBA:
@@ -76,6 +87,12 @@ static GLboolean can_swizzle(GLenum logicalBaseFormat)
case GL_INTENSITY:
case GL_ALPHA:
case GL_LUMINANCE:
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_BGR:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
return GL_TRUE;
default:
return GL_FALSE;
@@ -83,89 +100,172 @@ static GLboolean can_swizzle(GLenum logicalBaseFormat)
}
+
+enum {
+ IDX_LUMINANCE = 0,
+ IDX_ALPHA,
+ IDX_INTENSITY,
+ IDX_LUMINANCE_ALPHA,
+ IDX_RGB,
+ IDX_RGBA,
+ IDX_RED,
+ IDX_GREEN,
+ IDX_BLUE,
+ IDX_BGR,
+ IDX_BGRA,
+ IDX_ABGR,
+ MAX_IDX
+};
+
+#define MAP1(x) MAP4(x, ZERO, ZERO, ZERO)
+#define MAP2(x,y) MAP4(x, y, ZERO, ZERO)
+#define MAP3(x,y,z) MAP4(x, y, z, ZERO)
+#define MAP4(x,y,z,w) { x, y, z, w, ZERO, ONE }
+
+
+static const struct {
+ GLubyte format_idx;
+ GLubyte to_rgba[6];
+ GLubyte from_rgba[6];
+} mappings[MAX_IDX] =
+{
+ {
+ IDX_LUMINANCE,
+ MAP4(0,0,0,ONE),
+ MAP1(0)
+ },
+
+ {
+ IDX_ALPHA,
+ MAP4(ZERO, ZERO, ZERO, 0),
+ MAP1(3)
+ },
+
+ {
+ IDX_INTENSITY,
+ MAP4(0, 0, 0, 0),
+ MAP1(0),
+ },
+
+ {
+ IDX_LUMINANCE_ALPHA,
+ MAP4(0,0,0,1),
+ MAP2(0,3)
+ },
+
+ {
+ IDX_RGB,
+ MAP4(0,1,2,ONE),
+ MAP3(0,1,2)
+ },
+
+ {
+ IDX_RGBA,
+ MAP4(0,1,2,3),
+ MAP4(0,1,2,3),
+ },
+
+
+ {
+ IDX_RED,
+ MAP4(0, ZERO, ZERO, ONE),
+ MAP1(0),
+ },
+
+ {
+ IDX_GREEN,
+ MAP4(ZERO, 0, ZERO, ONE),
+ MAP1(1),
+ },
+
+ {
+ IDX_BLUE,
+ MAP4(ZERO, ZERO, 0, ONE),
+ MAP1(2),
+ },
+
+ {
+ IDX_BGR,
+ MAP4(2,1,0,ONE),
+ MAP3(2,1,0)
+ },
+
+ {
+ IDX_BGRA,
+ MAP4(2,1,0,3),
+ MAP4(2,1,0,3)
+ },
+
+ {
+ IDX_ABGR,
+ MAP4(3,2,1,0),
+ MAP4(3,2,1,0)
+ },
+};
+
+
+
+/**
+ * Convert a GL image format enum to an IDX_* value (see above).
+ */
+static int
+get_map_idx(GLenum value)
+{
+ switch (value) {
+ case GL_LUMINANCE: return IDX_LUMINANCE;
+ case GL_ALPHA: return IDX_ALPHA;
+ case GL_INTENSITY: return IDX_INTENSITY;
+ case GL_LUMINANCE_ALPHA: return IDX_LUMINANCE_ALPHA;
+ case GL_RGB: return IDX_RGB;
+ case GL_RGBA: return IDX_RGBA;
+ case GL_RED: return IDX_RED;
+ case GL_GREEN: return IDX_GREEN;
+ case GL_BLUE: return IDX_BLUE;
+ case GL_BGR: return IDX_BGR;
+ case GL_BGRA: return IDX_BGRA;
+ case GL_ABGR_EXT: return IDX_ABGR;
+ default:
+ _mesa_problem(NULL, "Unexpected inFormat");
+ return 0;
+ }
+}
+
+
/**
* When promoting texture formats (see below) we need to compute the
* mapping of dest components back to source components.
* This function does that.
- * \param logicalBaseFormat the logical format of the texture
- * \param textureBaseFormat the final texture format
- * \return map[4] the four mapping values
+ * \param inFormat the incoming format of the texture
+ * \param outFormat the final texture format
+ * \return map[6] a full 6-component map
*/
static void
-compute_component_mapping(GLenum logicalBaseFormat, GLenum textureBaseFormat,
- GLubyte map[6])
+compute_component_mapping(GLenum inFormat, GLenum outFormat,
+ GLubyte *map)
{
+ const int inFmt = get_map_idx(inFormat);
+ const int outFmt = get_map_idx(outFormat);
+ const GLubyte *in2rgba = mappings[inFmt].to_rgba;
+ const GLubyte *rgba2out = mappings[outFmt].from_rgba;
+ int i;
+
+ for (i = 0; i < 4; i++)
+ map[i] = in2rgba[rgba2out[i]];
+
map[ZERO] = ZERO;
- map[ONE] = ONE;
+ map[ONE] = ONE;
- /* compute mapping from dest components back to src components */
- switch (textureBaseFormat) {
- case GL_RGB:
- case GL_RGBA:
- switch (logicalBaseFormat) {
- case GL_LUMINANCE:
- map[0] = map[1] = map[2] = 0;
- if (textureBaseFormat == GL_RGBA)
- map[3] = ONE;
- break;
- case GL_ALPHA:
- ASSERT(textureBaseFormat == GL_RGBA);
- map[0] = map[1] = map[2] = ZERO;
- map[3] = 0;
- break;
- case GL_INTENSITY:
- map[0] = map[1] = map[2] = 0;
- if (textureBaseFormat == GL_RGBA)
- map[3] = 0;
- break;
- case GL_LUMINANCE_ALPHA:
- ASSERT(textureBaseFormat == GL_RGBA);
- map[0] = map[1] = map[2] = 0;
- map[3] = 1;
- break;
- case GL_RGB:
- ASSERT(textureBaseFormat == GL_RGBA);
- map[0] = 0;
- map[1] = 1;
- map[2] = 2;
- map[3] = ONE;
- break;
- case GL_RGBA:
- ASSERT(textureBaseFormat == GL_RGBA);
- map[0] = 0;
- map[1] = 1;
- map[2] = 2;
- map[3] = 3;
- break;
- default:
- _mesa_problem(NULL, "Unexpected logicalBaseFormat");
- map[0] = map[1] = map[2] = map[3] = 0;
- }
- break;
- case GL_LUMINANCE_ALPHA:
- switch (logicalBaseFormat) {
- case GL_LUMINANCE:
- map[0] = 0;
- map[1] = ONE;
- break;
- case GL_ALPHA:
- map[0] = ZERO;
- map[1] = 0;
- break;
- case GL_INTENSITY:
- map[0] = 0;
- map[1] = 0;
- break;
- default:
- _mesa_problem(NULL, "Unexpected logicalBaseFormat");
- map[0] = map[1] = 0;
- }
- break;
- default:
- _mesa_problem(NULL, "Unexpected textureBaseFormat");
- map[0] = map[1] = 0;
- break;
- }
+/*
+ _mesa_printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n",
+ inFormat, _mesa_lookup_enum_by_nr(inFormat),
+ outFormat, _mesa_lookup_enum_by_nr(outFormat),
+ map[0],
+ map[1],
+ map[2],
+ map[3],
+ map[4],
+ map[5]);
+*/
}
@@ -298,7 +398,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
GLfloat *dst = tempImage + img * (convWidth * convHeight * 4);
for (row = 0; row < convHeight; row++) {
_mesa_pack_rgba_span_float(ctx, convWidth,
- (const GLfloat (*)[4]) src,
+ (GLfloat (*)[4]) src,
logicalBaseFormat, GL_FLOAT,
dst, &ctx->DefaultPacking,
postConvTransferOps);
@@ -552,14 +652,16 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
* \param dstComponents number of color components in destination pixels
* \param src source pixels
* \param srcComponents number of color components in source pixels
- * \param map the swizzle mapping
+ * \param map the swizzle mapping. map[X] says where to find the X component
+ * in the source image's pixels. For example, if the source image
+ * is GL_BGRA and X = red, map[0] yields 2.
* \param count number of pixels to copy/swizzle.
*/
static void
swizzle_copy(GLubyte *dst, GLuint dstComponents, const GLubyte *src,
GLuint srcComponents, const GLubyte *map, GLuint count)
{
- GLubyte tmp[8];
+ GLubyte tmp[6];
GLuint i;
tmp[ZERO] = 0x0;
@@ -596,10 +698,61 @@ swizzle_copy(GLubyte *dst, GLuint dstComponents, const GLubyte *src,
dst += 2;
}
break;
+ case 1:
+ /* XXX investigate valgrind invalid read when running demos/texenv.c */
+ for (i = 0; i < count; i++) {
+ COPY_4UBV(tmp, src);
+ src += srcComponents;
+ dst[0] = tmp[map[0]];
+ dst += 1;
+ }
+ break;
+ }
+}
+
+
+static const GLubyte map_identity[6] = { 0, 1, 2, 3, ZERO, ONE };
+static const GLubyte map_3210[6] = { 3, 2, 1, 0, ZERO, ONE };
+
+/* Deal with the _REV input types:
+ */
+static const GLubyte *
+type_mapping( GLenum srcType )
+{
+ switch (srcType) {
+ case GL_UNSIGNED_BYTE:
+ return map_identity;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ return _mesa_little_endian() ? map_3210 : map_identity;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ return _mesa_little_endian() ? map_identity : map_3210;
+ default:
+ return NULL;
+ }
+}
+
+/* Mapping required if input type is
+ */
+static const GLubyte *
+byteswap_mapping( GLboolean swapBytes,
+ GLenum srcType )
+{
+ if (!swapBytes)
+ return map_identity;
+
+ switch (srcType) {
+ case GL_UNSIGNED_BYTE:
+ return map_identity;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ return map_3210;
+ default:
+ return NULL;
}
}
+
/**
* Transfer a GLubyte texture image with component swizzling.
*/
@@ -607,7 +760,12 @@ static void
_mesa_swizzle_ubyte_image(GLcontext *ctx,
GLuint dimensions,
GLenum srcFormat,
- const GLubyte *dstmap, GLint dstComponents,
+ GLenum srcType,
+
+ GLenum baseInternalFormat,
+
+ const GLubyte *rgba2dst,
+ GLuint dstComponents,
GLvoid *dstAddr,
GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,
@@ -619,9 +777,9 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx,
const struct gl_pixelstore_attrib *srcPacking )
{
GLint srcComponents = _mesa_components_in_format(srcFormat);
- GLubyte srcmap[6], map[4];
+ const GLubyte *srctype2ubyte, *swap;
+ GLubyte map[4], src2base[6], base2rgba[6];
GLint i;
-
const GLint srcRowStride =
_mesa_image_row_stride(srcPacking, srcWidth,
srcFormat, GL_UNSIGNED_BYTE);
@@ -635,10 +793,20 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx,
(void) ctx;
- compute_component_mapping(srcFormat, GL_RGBA, srcmap);
+ /* Translate from src->baseInternal->GL_RGBA->dst. This will
+ * correctly deal with RGBA->RGB->RGBA conversions where the final
+ * A value must be 0xff regardless of the incoming alpha values.
+ */
+ compute_component_mapping(srcFormat, baseInternalFormat, src2base);
+ compute_component_mapping(baseInternalFormat, GL_RGBA, base2rgba);
+ swap = byteswap_mapping(srcPacking->SwapBytes, srcType);
+ srctype2ubyte = type_mapping(srcType);
+
for (i = 0; i < 4; i++)
- map[i] = srcmap[dstmap[i]];
+ map[i] = srctype2ubyte[swap[src2base[base2rgba[rgba2dst[i]]]]];
+
+/* _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */
if (srcRowStride == srcWidth * srcComponents &&
dimensions < 3) {
@@ -817,6 +985,58 @@ _mesa_texstore_rgba(TEXSTORE_PARAMS)
}
}
}
+ else if (!ctx->_ImageTransferState &&
+ CHAN_TYPE == GL_UNSIGNED_BYTE &&
+ (srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ const GLubyte *dstmap;
+ GLuint components;
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if (dstFormat == &_mesa_texformat_rgba) {
+ dstmap = mappings[IDX_RGBA].from_rgba;
+ components = 4;
+ }
+ else if (dstFormat == &_mesa_texformat_rgb) {
+ dstmap = mappings[IDX_RGB].from_rgba;
+ components = 3;
+ }
+ else if (dstFormat == &_mesa_texformat_alpha) {
+ dstmap = mappings[IDX_ALPHA].from_rgba;
+ components = 1;
+ }
+ else if (dstFormat == &_mesa_texformat_luminance) {
+ dstmap = mappings[IDX_LUMINANCE].from_rgba;
+ components = 1;
+ }
+ else if (dstFormat == &_mesa_texformat_luminance_alpha) {
+ dstmap = mappings[IDX_LUMINANCE_ALPHA].from_rgba;
+ components = 2;
+ }
+ else if (dstFormat == &_mesa_texformat_intensity) {
+ dstmap = mappings[IDX_INTENSITY].from_rgba;
+ components = 1;
+ }
+ else {
+ _mesa_problem(ctx, "Unexpected dstFormat in _mesa_texstore_rgba");
+ return GL_FALSE;
+ }
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, components,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
@@ -1050,13 +1270,14 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
}
+/**
+ * Store a texture in MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV.
+ */
GLboolean
_mesa_texstore_rgba8888(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
- (void)littleEndian;
ASSERT(dstFormat == &_mesa_texformat_rgba8888 ||
dstFormat == &_mesa_texformat_rgba8888_rev);
ASSERT(dstFormat->TexelBytes == 4);
@@ -1093,40 +1314,41 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
}
-#if 0
- /* broken? */
else if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- srcType == GL_UNSIGNED_BYTE &&
- dstFormat == &_mesa_texformat_rgba8888 &&
- littleEndian &&
- /* Three texture formats involved: srcFormat,
- * baseInternalFormat and destFormat (GL_RGBA). Only two
- * may differ. _mesa_swizzle_ubyte_image can't handle two
- * propagations at once correctly. */
- (srcFormat == baseInternalFormat ||
- baseInternalFormat == GL_RGBA) &&
+ (srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
+ can_swizzle(baseInternalFormat) &&
can_swizzle(srcFormat)) {
+
GLubyte dstmap[4];
- /* dstmap - how to swizzle from GL_RGBA to dst format:
- *
- * FIXME - add !litteEndian and _rev varients:
+ /* dstmap - how to swizzle from RGBA to dst format:
*/
- dstmap[3] = 0;
- dstmap[2] = 1;
- dstmap[1] = 2;
- dstmap[0] = 3;
+ if ((littleEndian && dstFormat == &_mesa_texformat_rgba8888) ||
+ (!littleEndian && dstFormat == &_mesa_texformat_rgba8888_rev)) {
+ dstmap[3] = 0;
+ dstmap[2] = 1;
+ dstmap[1] = 2;
+ dstmap[0] = 3;
+ }
+ else {
+ dstmap[3] = 3;
+ dstmap[2] = 2;
+ dstmap[1] = 1;
+ dstmap[0] = 0;
+ }
_mesa_swizzle_ubyte_image(ctx, dims,
srcFormat,
+ srcType,
+ baseInternalFormat,
dstmap, 4,
dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride, dstImageStride,
+ dstRowStride, dstImageOffsets,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
}
-#endif
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
@@ -1177,8 +1399,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_argb8888(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
ASSERT(dstFormat == &_mesa_texformat_argb8888 ||
dstFormat == &_mesa_texformat_argb8888_rev);
@@ -1218,6 +1439,8 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
!srcPacking->SwapBytes &&
dstFormat == &_mesa_texformat_argb8888 &&
srcFormat == GL_RGB &&
+ (baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB) &&
srcType == GL_UNSIGNED_BYTE) {
int img, row, col;
@@ -1246,6 +1469,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
!srcPacking->SwapBytes &&
dstFormat == &_mesa_texformat_argb8888 &&
srcFormat == GL_RGBA &&
+ baseInternalFormat == GL_RGBA &&
(srcType == GL_UNSIGNED_BYTE && littleEndian)) {
GLint img, row, col;
/* For some reason, streaming copies to write-combined regions
@@ -1280,6 +1504,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
!srcPacking->SwapBytes &&
dstFormat == &_mesa_texformat_argb8888 &&
srcFormat == GL_RGBA &&
+ baseInternalFormat == GL_RGBA &&
srcType == GL_UNSIGNED_BYTE) {
GLint img, row, col;
@@ -1305,29 +1530,37 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
}
else if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb8888 &&
- srcType == GL_UNSIGNED_BYTE &&
- littleEndian &&
- /* Three texture formats involved: srcFormat,
- * baseInternalFormat and destFormat (GL_RGBA). Only two
- * may differ. _mesa_swizzle_ubyte_image can't handle two
- * propagations at once correctly. */
- (srcFormat == baseInternalFormat ||
- baseInternalFormat == GL_RGBA) &&
+ (srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
+ can_swizzle(baseInternalFormat) &&
can_swizzle(srcFormat)) {
GLubyte dstmap[4];
- /* dstmap - how to swizzle from GL_RGBA to dst format:
+ /* dstmap - how to swizzle from RGBA to dst format:
*/
- dstmap[3] = 3; /* alpha */
- dstmap[2] = 0; /* red */
- dstmap[1] = 1; /* green */
- dstmap[0] = 2; /* blue */
+ if ((littleEndian && dstFormat == &_mesa_texformat_argb8888) ||
+ (!littleEndian && dstFormat == &_mesa_texformat_argb8888_rev)) {
+ dstmap[3] = 3; /* alpha */
+ dstmap[2] = 0; /* red */
+ dstmap[1] = 1; /* green */
+ dstmap[0] = 2; /* blue */
+ }
+ else {
+ assert((littleEndian && dstFormat == &_mesa_texformat_argb8888_rev) ||
+ (!littleEndian && dstFormat == &_mesa_texformat_argb8888));
+ dstmap[3] = 2;
+ dstmap[2] = 1;
+ dstmap[1] = 0;
+ dstmap[0] = 3;
+ }
_mesa_swizzle_ubyte_image(ctx, dims,
srcFormat,
+ srcType,
+
+ baseInternalFormat,
dstmap, 4,
dstAddr, dstXoffset, dstYoffset, dstZoffset,
dstRowStride,
@@ -1385,8 +1618,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_rgb888(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
ASSERT(dstFormat == &_mesa_texformat_rgb888);
ASSERT(dstFormat->TexelBytes == 3);
@@ -1431,6 +1663,30 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
}
}
}
+ else if (!ctx->_ImageTransferState &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ dstmap[0] = 2;
+ dstmap[1] = 1;
+ dstmap[2] = 0;
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 3,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
@@ -1487,8 +1743,7 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_bgr888(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
ASSERT(dstFormat == &_mesa_texformat_bgr888);
ASSERT(dstFormat->TexelBytes == 3);
@@ -1533,6 +1788,30 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
}
}
}
+ else if (!ctx->_ImageTransferState &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ dstmap[0] = 0;
+ dstmap[1] = 1;
+ dstmap[2] = 2;
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 3,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
@@ -1707,8 +1986,7 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_al88(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
ASSERT(dstFormat == &_mesa_texformat_al88 ||
dstFormat == &_mesa_texformat_al88_rev);
@@ -1729,6 +2007,38 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
}
+ else if (!ctx->_ImageTransferState &&
+ littleEndian &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if ((littleEndian && dstFormat == &_mesa_texformat_al88) ||
+ (!littleEndian && dstFormat == &_mesa_texformat_al88_rev)) {
+ dstmap[0] = 0;
+ dstmap[1] = 3;
+ }
+ else {
+ dstmap[0] = 3;
+ dstmap[1] = 0;
+ }
+ dstmap[2] = ZERO; /* ? */
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 2,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
@@ -1849,6 +2159,35 @@ _mesa_texstore_a8(TEXSTORE_PARAMS)
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
}
+ else if (!ctx->_ImageTransferState &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if (dstFormat == &_mesa_texformat_a8) {
+ dstmap[0] = 3;
+ }
+ else {
+ dstmap[0] = 0;
+ }
+ dstmap[1] = ZERO; /* ? */
+ dstmap[2] = ZERO; /* ? */
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 1,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
@@ -1930,8 +2269,7 @@ _mesa_texstore_ci8(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_ycbcr(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
(void) ctx; (void) dims; (void) baseInternalFormat;
ASSERT((dstFormat == &_mesa_texformat_ycbcr) ||
@@ -2186,8 +2524,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
const struct gl_texture_format *newDstFormat;
StoreTexImageFunc store;
GLboolean k;
@@ -2218,8 +2555,7 @@ _mesa_texstore_srgb8(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_srgba8(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
const struct gl_texture_format *newDstFormat;
GLboolean k;
@@ -2267,8 +2603,7 @@ _mesa_texstore_sl8(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_sla8(TEXSTORE_PARAMS)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
+ const GLboolean littleEndian = _mesa_little_endian();
const struct gl_texture_format *newDstFormat;
GLboolean k;
@@ -2386,8 +2721,8 @@ _mesa_unmap_teximage_pbo(GLcontext *ctx,
* Adaptor for fetching a GLchan texel from a float-valued texture.
*/
static void
-FetchTexelFloatToChan( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texelOut )
+fetch_texel_float_to_chan(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLchan *texelOut)
{
GLfloat temp[4];
ASSERT(texImage->FetchTexelf);
@@ -2411,8 +2746,8 @@ FetchTexelFloatToChan( const struct gl_texture_image *texImage,
* Adaptor for fetching a float texel from a GLchan-valued texture.
*/
static void
-FetchTexelChanToFloat( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texelOut )
+fetch_texel_chan_to_float(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texelOut)
{
GLchan temp[4];
ASSERT(texImage->FetchTexelc);
@@ -2460,10 +2795,10 @@ set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
/* now check if we need to use a float/chan adaptor */
if (!texImage->FetchTexelc) {
- texImage->FetchTexelc = FetchTexelFloatToChan;
+ texImage->FetchTexelc = fetch_texel_float_to_chan;
}
else if (!texImage->FetchTexelf) {
- texImage->FetchTexelf = FetchTexelChanToFloat;
+ texImage->FetchTexelf = fetch_texel_chan_to_float;
}
@@ -3119,1114 +3454,6 @@ _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
}
-/*
- * Average together two rows of a source image to produce a single new
- * row in the dest image. It's legal for the two source rows to point
- * to the same data. The source width must be equal to either the
- * dest width or two times the dest width.
- */
-static void
-do_row(const struct gl_texture_format *format, GLint srcWidth,
- const GLvoid *srcRowA, const GLvoid *srcRowB,
- GLint dstWidth, GLvoid *dstRow)
-{
- const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1;
- const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2;
-
- /* This assertion is no longer valid with non-power-of-2 textures
- assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth);
- */
-
- switch (format->MesaFormat) {
- case MESA_FORMAT_RGBA:
- {
- GLuint i, j, k;
- const GLchan (*rowA)[4] = (const GLchan (*)[4]) srcRowA;
- const GLchan (*rowB)[4] = (const GLchan (*)[4]) srcRowB;
- GLchan (*dst)[4] = (GLchan (*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) / 4;
- dst[i][3] = (rowA[j][3] + rowA[k][3] +
- rowB[j][3] + rowB[k][3]) / 4;
- }
- }
- return;
- case MESA_FORMAT_RGB:
- {
- GLuint i, j, k;
- const GLchan (*rowA)[3] = (const GLchan (*)[3]) srcRowA;
- const GLchan (*rowB)[3] = (const GLchan (*)[3]) srcRowB;
- GLchan (*dst)[3] = (GLchan (*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) / 4;
- }
- }
- return;
- case MESA_FORMAT_ALPHA:
- case MESA_FORMAT_LUMINANCE:
- case MESA_FORMAT_INTENSITY:
- {
- GLuint i, j, k;
- const GLchan *rowA = (const GLchan *) srcRowA;
- const GLchan *rowB = (const GLchan *) srcRowB;
- GLchan *dst = (GLchan *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
- }
- }
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA:
- {
- GLuint i, j, k;
- const GLchan (*rowA)[2] = (const GLchan (*)[2]) srcRowA;
- const GLchan (*rowB)[2] = (const GLchan (*)[2]) srcRowB;
- GLchan (*dst)[2] = (GLchan (*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) / 4;
- }
- }
- return;
- case MESA_FORMAT_Z32:
- {
- GLuint i, j, k;
- const GLuint *rowA = (const GLuint *) srcRowA;
- const GLuint *rowB = (const GLuint *) srcRowB;
- GLfloat *dst = (GLfloat *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4;
- }
- }
- return;
- case MESA_FORMAT_Z16:
- {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
- }
- }
- return;
- /* Begin hardware formats */
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGBA8:
-#endif
- {
- GLuint i, j, k;
- const GLubyte (*rowA)[4] = (const GLubyte (*)[4]) srcRowA;
- const GLubyte (*rowB)[4] = (const GLubyte (*)[4]) srcRowB;
- GLubyte (*dst)[4] = (GLubyte (*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) / 4;
- dst[i][3] = (rowA[j][3] + rowA[k][3] +
- rowB[j][3] + rowB[k][3]) / 4;
- }
- }
- return;
- case MESA_FORMAT_RGB888:
- case MESA_FORMAT_BGR888:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGB8:
-#endif
- {
- GLuint i, j, k;
- const GLubyte (*rowA)[3] = (const GLubyte (*)[3]) srcRowA;
- const GLubyte (*rowB)[3] = (const GLubyte (*)[3]) srcRowB;
- GLubyte (*dst)[3] = (GLubyte (*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) / 4;
- }
- }
- return;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x1f;
- const GLint rowAr1 = rowA[k] & 0x1f;
- const GLint rowBr0 = rowB[j] & 0x1f;
- const GLint rowBr1 = rowB[k] & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 5) & 0x3f;
- const GLint rowAg1 = (rowA[k] >> 5) & 0x3f;
- const GLint rowBg0 = (rowB[j] >> 5) & 0x3f;
- const GLint rowBg1 = (rowB[k] >> 5) & 0x3f;
- const GLint rowAb0 = (rowA[j] >> 11) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 11) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 11) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 11) & 0x1f;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- dst[i] = (blue << 11) | (green << 5) | red;
- }
- }
- return;
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0xf;
- const GLint rowAr1 = rowA[k] & 0xf;
- const GLint rowBr0 = rowB[j] & 0xf;
- const GLint rowBr1 = rowB[k] & 0xf;
- const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
- const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
- const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
- const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
- const GLint rowAb0 = (rowA[j] >> 8) & 0xf;
- const GLint rowAb1 = (rowA[k] >> 8) & 0xf;
- const GLint rowBb0 = (rowB[j] >> 8) & 0xf;
- const GLint rowBb1 = (rowB[k] >> 8) & 0xf;
- const GLint rowAa0 = (rowA[j] >> 12) & 0xf;
- const GLint rowAa1 = (rowA[k] >> 12) & 0xf;
- const GLint rowBa0 = (rowB[j] >> 12) & 0xf;
- const GLint rowBa1 = (rowB[k] >> 12) & 0xf;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
- dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red;
- }
- }
- return;
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB1555_REV: /* XXX broken? */
- {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x1f;
- const GLint rowAr1 = rowA[k] & 0x1f;
- const GLint rowBr0 = rowB[j] & 0x1f;
- const GLint rowBr1 = rowB[k] & 0xf;
- const GLint rowAg0 = (rowA[j] >> 5) & 0x1f;
- const GLint rowAg1 = (rowA[k] >> 5) & 0x1f;
- const GLint rowBg0 = (rowB[j] >> 5) & 0x1f;
- const GLint rowBg1 = (rowB[k] >> 5) & 0x1f;
- const GLint rowAb0 = (rowA[j] >> 10) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 10) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 10) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 10) & 0x1f;
- const GLint rowAa0 = (rowA[j] >> 15) & 0x1;
- const GLint rowAa1 = (rowA[k] >> 15) & 0x1;
- const GLint rowBa0 = (rowB[j] >> 15) & 0x1;
- const GLint rowBa1 = (rowB[k] >> 15) & 0x1;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
- dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red;
- }
- }
- return;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SLA8:
-#endif
- {
- GLuint i, j, k;
- const GLubyte (*rowA)[2] = (const GLubyte (*)[2]) srcRowA;
- const GLubyte (*rowB)[2] = (const GLubyte (*)[2]) srcRowB;
- GLubyte (*dst)[2] = (GLubyte (*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) >> 2;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) >> 2;
- }
- }
- return;
- case MESA_FORMAT_RGB332:
- {
- GLuint i, j, k;
- const GLubyte *rowA = (const GLubyte *) srcRowA;
- const GLubyte *rowB = (const GLubyte *) srcRowB;
- GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x3;
- const GLint rowAr1 = rowA[k] & 0x3;
- const GLint rowBr0 = rowB[j] & 0x3;
- const GLint rowBr1 = rowB[k] & 0x3;
- const GLint rowAg0 = (rowA[j] >> 2) & 0x7;
- const GLint rowAg1 = (rowA[k] >> 2) & 0x7;
- const GLint rowBg0 = (rowB[j] >> 2) & 0x7;
- const GLint rowBg1 = (rowB[k] >> 2) & 0x7;
- const GLint rowAb0 = (rowA[j] >> 5) & 0x7;
- const GLint rowAb1 = (rowA[k] >> 5) & 0x7;
- const GLint rowBb0 = (rowB[j] >> 5) & 0x7;
- const GLint rowBb1 = (rowB[k] >> 5) & 0x7;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- dst[i] = (blue << 5) | (green << 2) | red;
- }
- }
- return;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_CI8:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SL8:
-#endif
- {
- GLuint i, j, k;
- const GLubyte *rowA = (const GLubyte *) srcRowA;
- const GLubyte *rowB = (const GLubyte *) srcRowB;
- GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2;
- }
- }
- return;
- case MESA_FORMAT_RGBA_FLOAT32:
- {
- GLuint i, j, k;
- const GLfloat (*rowA)[4] = (const GLfloat (*)[4]) srcRowA;
- const GLfloat (*rowB)[4] = (const GLfloat (*)[4]) srcRowB;
- GLfloat (*dst)[4] = (GLfloat (*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) * 0.25F;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) * 0.25F;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) * 0.25F;
- dst[i][3] = (rowA[j][3] + rowA[k][3] +
- rowB[j][3] + rowB[k][3]) * 0.25F;
- }
- }
- return;
- case MESA_FORMAT_RGBA_FLOAT16:
- {
- GLuint i, j, k, comp;
- const GLhalfARB (*rowA)[4] = (const GLhalfARB (*)[4]) srcRowA;
- const GLhalfARB (*rowB)[4] = (const GLhalfARB (*)[4]) srcRowB;
- GLhalfARB (*dst)[4] = (GLhalfARB (*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- for (comp = 0; comp < 4; comp++) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j][comp]);
- ak = _mesa_half_to_float(rowA[k][comp]);
- bj = _mesa_half_to_float(rowB[j][comp]);
- bk = _mesa_half_to_float(rowB[k][comp]);
- dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- }
- return;
- case MESA_FORMAT_RGB_FLOAT32:
- {
- GLuint i, j, k;
- const GLfloat (*rowA)[3] = (const GLfloat (*)[3]) srcRowA;
- const GLfloat (*rowB)[3] = (const GLfloat (*)[3]) srcRowB;
- GLfloat (*dst)[3] = (GLfloat (*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) * 0.25F;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) * 0.25F;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) * 0.25F;
- }
- }
- return;
- case MESA_FORMAT_RGB_FLOAT16:
- {
- GLuint i, j, k, comp;
- const GLhalfARB (*rowA)[3] = (const GLhalfARB (*)[3]) srcRowA;
- const GLhalfARB (*rowB)[3] = (const GLhalfARB (*)[3]) srcRowB;
- GLhalfARB (*dst)[3] = (GLhalfARB (*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- for (comp = 0; comp < 3; comp++) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j][comp]);
- ak = _mesa_half_to_float(rowA[k][comp]);
- bj = _mesa_half_to_float(rowB[j][comp]);
- bk = _mesa_half_to_float(rowB[k][comp]);
- dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- }
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
- {
- GLuint i, j, k;
- const GLfloat (*rowA)[2] = (const GLfloat (*)[2]) srcRowA;
- const GLfloat (*rowB)[2] = (const GLfloat (*)[2]) srcRowB;
- GLfloat (*dst)[2] = (GLfloat (*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) * 0.25F;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) * 0.25F;
- }
- }
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
- {
- GLuint i, j, k, comp;
- const GLhalfARB (*rowA)[2] = (const GLhalfARB (*)[2]) srcRowA;
- const GLhalfARB (*rowB)[2] = (const GLhalfARB (*)[2]) srcRowB;
- GLhalfARB (*dst)[2] = (GLhalfARB (*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- for (comp = 0; comp < 2; comp++) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j][comp]);
- ak = _mesa_half_to_float(rowA[k][comp]);
- bj = _mesa_half_to_float(rowB[j][comp]);
- bk = _mesa_half_to_float(rowB[k][comp]);
- dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- }
- return;
- case MESA_FORMAT_ALPHA_FLOAT32:
- case MESA_FORMAT_LUMINANCE_FLOAT32:
- case MESA_FORMAT_INTENSITY_FLOAT32:
- {
- GLuint i, j, k;
- const GLfloat *rowA = (const GLfloat *) srcRowA;
- const GLfloat *rowB = (const GLfloat *) srcRowB;
- GLfloat *dst = (GLfloat *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F;
- }
- }
- return;
- case MESA_FORMAT_ALPHA_FLOAT16:
- case MESA_FORMAT_LUMINANCE_FLOAT16:
- case MESA_FORMAT_INTENSITY_FLOAT16:
- {
- GLuint i, j, k;
- const GLhalfARB *rowA = (const GLhalfARB *) srcRowA;
- const GLhalfARB *rowB = (const GLhalfARB *) srcRowB;
- GLhalfARB *dst = (GLhalfARB *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j]);
- ak = _mesa_half_to_float(rowA[k]);
- bj = _mesa_half_to_float(rowB[j]);
- bk = _mesa_half_to_float(rowB[k]);
- dst[i] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- return;
-
- default:
- _mesa_problem(NULL, "bad format in do_row()");
- }
-}
-
-
-/*
- * These functions generate a 1/2-size mipmap image from a source image.
- * Texture borders are handled by copying or averaging the source image's
- * border texels, depending on the scale-down factor.
- */
-
-static void
-make_1d_mipmap(const struct gl_texture_format *format, GLint border,
- GLint srcWidth, const GLubyte *srcPtr,
- GLint dstWidth, GLubyte *dstPtr)
-{
- const GLint bpt = format->TexelBytes;
- const GLubyte *src;
- GLubyte *dst;
-
- /* skip the border pixel, if any */
- src = srcPtr + border * bpt;
- dst = dstPtr + border * bpt;
-
- /* we just duplicate the input row, kind of hack, saves code */
- do_row(format, srcWidth - 2 * border, src, src,
- dstWidth - 2 * border, dst);
-
- if (border) {
- /* copy left-most pixel from source */
- MEMCPY(dstPtr, srcPtr, bpt);
- /* copy right-most pixel from source */
- MEMCPY(dstPtr + (dstWidth - 1) * bpt,
- srcPtr + (srcWidth - 1) * bpt,
- bpt);
- }
-}
-
-
-/**
- * XXX need to use the tex image's row stride!
- */
-static void
-make_2d_mipmap(const struct gl_texture_format *format, GLint border,
- GLint srcWidth, GLint srcHeight, const GLubyte *srcPtr,
- GLint dstWidth, GLint dstHeight, GLubyte *dstPtr)
-{
- const GLint bpt = format->TexelBytes;
- const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
- const GLint dstWidthNB = dstWidth - 2 * border;
- const GLint dstHeightNB = dstHeight - 2 * border;
- const GLint srcRowStride = bpt * srcWidth;
- const GLint dstRowStride = bpt * dstWidth;
- const GLubyte *srcA, *srcB;
- GLubyte *dst;
- GLint row;
-
- /* Compute src and dst pointers, skipping any border */
- srcA = srcPtr + border * ((srcWidth + 1) * bpt);
- if (srcHeight > 1)
- srcB = srcA + srcRowStride;
- else
- srcB = srcA;
- dst = dstPtr + border * ((dstWidth + 1) * bpt);
-
- for (row = 0; row < dstHeightNB; row++) {
- do_row(format, srcWidthNB, srcA, srcB,
- dstWidthNB, dst);
- srcA += 2 * srcRowStride;
- srcB += 2 * srcRowStride;
- dst += dstRowStride;
- }
-
- /* This is ugly but probably won't be used much */
- if (border > 0) {
- /* fill in dest border */
- /* lower-left border pixel */
- MEMCPY(dstPtr, srcPtr, bpt);
- /* lower-right border pixel */
- MEMCPY(dstPtr + (dstWidth - 1) * bpt,
- srcPtr + (srcWidth - 1) * bpt, bpt);
- /* upper-left border pixel */
- MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt,
- srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt);
- /* upper-right border pixel */
- MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt,
- srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt);
- /* lower border */
- do_row(format, srcWidthNB,
- srcPtr + bpt,
- srcPtr + bpt,
- dstWidthNB, dstPtr + bpt);
- /* upper border */
- do_row(format, srcWidthNB,
- srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
- srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
- dstWidthNB,
- dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt);
- /* left and right borders */
- if (srcHeight == dstHeight) {
- /* copy border pixel from src to dst */
- for (row = 1; row < srcHeight; row++) {
- MEMCPY(dstPtr + dstWidth * row * bpt,
- srcPtr + srcWidth * row * bpt, bpt);
- MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
- srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt);
- }
- }
- else {
- /* average two src pixels each dest pixel */
- for (row = 0; row < dstHeightNB; row += 2) {
- do_row(format, 1,
- srcPtr + (srcWidth * (row * 2 + 1)) * bpt,
- srcPtr + (srcWidth * (row * 2 + 2)) * bpt,
- 1, dstPtr + (dstWidth * row + 1) * bpt);
- do_row(format, 1,
- srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt,
- srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt,
- 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt);
- }
- }
- }
-}
-
-
-static void
-make_3d_mipmap(const struct gl_texture_format *format, GLint border,
- GLint srcWidth, GLint srcHeight, GLint srcDepth,
- const GLubyte *srcPtr,
- GLint dstWidth, GLint dstHeight, GLint dstDepth,
- GLubyte *dstPtr)
-{
- const GLint bpt = format->TexelBytes;
- const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
- const GLint srcDepthNB = srcDepth - 2 * border;
- const GLint dstWidthNB = dstWidth - 2 * border;
- const GLint dstHeightNB = dstHeight - 2 * border;
- const GLint dstDepthNB = dstDepth - 2 * border;
- GLvoid *tmpRowA, *tmpRowB;
- GLint img, row;
- GLint bytesPerSrcImage, bytesPerDstImage;
- GLint bytesPerSrcRow, bytesPerDstRow;
- GLint srcImageOffset, srcRowOffset;
-
- (void) srcDepthNB; /* silence warnings */
-
- /* Need two temporary row buffers */
- tmpRowA = _mesa_malloc(srcWidth * bpt);
- if (!tmpRowA)
- return;
- tmpRowB = _mesa_malloc(srcWidth * bpt);
- if (!tmpRowB) {
- _mesa_free(tmpRowA);
- return;
- }
-
- bytesPerSrcImage = srcWidth * srcHeight * bpt;
- bytesPerDstImage = dstWidth * dstHeight * bpt;
-
- bytesPerSrcRow = srcWidth * bpt;
- bytesPerDstRow = dstWidth * bpt;
-
- /* Offset between adjacent src images to be averaged together */
- srcImageOffset = (srcDepth == dstDepth) ? 0 : bytesPerSrcImage;
-
- /* Offset between adjacent src rows to be averaged together */
- srcRowOffset = (srcHeight == dstHeight) ? 0 : srcWidth * bpt;
-
- /*
- * Need to average together up to 8 src pixels for each dest pixel.
- * Break that down into 3 operations:
- * 1. take two rows from source image and average them together.
- * 2. take two rows from next source image and average them together.
- * 3. take the two averaged rows and average them for the final dst row.
- */
-
- /*
- _mesa_printf("mip3d %d x %d x %d -> %d x %d x %d\n",
- srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth);
- */
-
- for (img = 0; img < dstDepthNB; img++) {
- /* first source image pointer, skipping border */
- const GLubyte *imgSrcA = srcPtr
- + (bytesPerSrcImage + bytesPerSrcRow + border) * bpt * border
- + img * (bytesPerSrcImage + srcImageOffset);
- /* second source image pointer, skipping border */
- const GLubyte *imgSrcB = imgSrcA + srcImageOffset;
- /* address of the dest image, skipping border */
- GLubyte *imgDst = dstPtr
- + (bytesPerDstImage + bytesPerDstRow + border) * bpt * border
- + img * bytesPerDstImage;
-
- /* setup the four source row pointers and the dest row pointer */
- const GLubyte *srcImgARowA = imgSrcA;
- const GLubyte *srcImgARowB = imgSrcA + srcRowOffset;
- const GLubyte *srcImgBRowA = imgSrcB;
- const GLubyte *srcImgBRowB = imgSrcB + srcRowOffset;
- GLubyte *dstImgRow = imgDst;
-
- for (row = 0; row < dstHeightNB; row++) {
- /* Average together two rows from first src image */
- do_row(format, srcWidthNB, srcImgARowA, srcImgARowB,
- srcWidthNB, tmpRowA);
- /* Average together two rows from second src image */
- do_row(format, srcWidthNB, srcImgBRowA, srcImgBRowB,
- srcWidthNB, tmpRowB);
- /* Average together the temp rows to make the final row */
- do_row(format, srcWidthNB, tmpRowA, tmpRowB,
- dstWidthNB, dstImgRow);
- /* advance to next rows */
- srcImgARowA += bytesPerSrcRow + srcRowOffset;
- srcImgARowB += bytesPerSrcRow + srcRowOffset;
- srcImgBRowA += bytesPerSrcRow + srcRowOffset;
- srcImgBRowB += bytesPerSrcRow + srcRowOffset;
- dstImgRow += bytesPerDstRow;
- }
- }
-
- _mesa_free(tmpRowA);
- _mesa_free(tmpRowB);
-
- /* Luckily we can leverage the make_2d_mipmap() function here! */
- if (border > 0) {
- /* do front border image */
- make_2d_mipmap(format, 1, srcWidth, srcHeight, srcPtr,
- dstWidth, dstHeight, dstPtr);
- /* do back border image */
- make_2d_mipmap(format, 1, srcWidth, srcHeight,
- srcPtr + bytesPerSrcImage * (srcDepth - 1),
- dstWidth, dstHeight,
- dstPtr + bytesPerDstImage * (dstDepth - 1));
- /* do four remaining border edges that span the image slices */
- if (srcDepth == dstDepth) {
- /* just copy border pixels from src to dst */
- for (img = 0; img < dstDepthNB; img++) {
- const GLubyte *src;
- GLubyte *dst;
-
- /* do border along [img][row=0][col=0] */
- src = srcPtr + (img + 1) * bytesPerSrcImage;
- dst = dstPtr + (img + 1) * bytesPerDstImage;
- MEMCPY(dst, src, bpt);
-
- /* do border along [img][row=dstHeight-1][col=0] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcHeight - 1) * bytesPerSrcRow;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstHeight - 1) * bytesPerDstRow;
- MEMCPY(dst, src, bpt);
-
- /* do border along [img][row=0][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcWidth - 1) * bpt;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstWidth - 1) * bpt;
- MEMCPY(dst, src, bpt);
-
- /* do border along [img][row=dstHeight-1][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (bytesPerSrcImage - bpt);
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (bytesPerDstImage - bpt);
- MEMCPY(dst, src, bpt);
- }
- }
- else {
- /* average border pixels from adjacent src image pairs */
- ASSERT(srcDepthNB == 2 * dstDepthNB);
- for (img = 0; img < dstDepthNB; img++) {
- const GLubyte *src;
- GLubyte *dst;
-
- /* do border along [img][row=0][col=0] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage;
- dst = dstPtr + (img + 1) * bytesPerDstImage;
- do_row(format, 1, src, src + srcImageOffset, 1, dst);
-
- /* do border along [img][row=dstHeight-1][col=0] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcHeight - 1) * bytesPerSrcRow;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstHeight - 1) * bytesPerDstRow;
- do_row(format, 1, src, src + srcImageOffset, 1, dst);
-
- /* do border along [img][row=0][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcWidth - 1) * bpt;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstWidth - 1) * bpt;
- do_row(format, 1, src, src + srcImageOffset, 1, dst);
-
- /* do border along [img][row=dstHeight-1][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (bytesPerSrcImage - bpt);
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (bytesPerDstImage - bpt);
- do_row(format, 1, src, src + srcImageOffset, 1, dst);
- }
- }
- }
-}
-
-
-/**
- * For GL_SGIX_generate_mipmap:
- * Generate a complete set of mipmaps from texObj's base-level image.
- * Stop at texObj's MaxLevel or when we get to the 1x1 texture.
- */
-void
-_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
- const struct gl_texture_unit *texUnit,
- struct gl_texture_object *texObj)
-{
- const struct gl_texture_image *srcImage;
- const struct gl_texture_format *convertFormat;
- const GLubyte *srcData = NULL;
- GLubyte *dstData = NULL;
- GLint level, maxLevels;
-
- ASSERT(texObj);
- /* XXX choose cube map face here??? */
- srcImage = texObj->Image[0][texObj->BaseLevel];
- ASSERT(srcImage);
-
- maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
- ASSERT(maxLevels > 0); /* bad target */
-
- /* Find convertFormat - the format that do_row() will process */
- if (srcImage->IsCompressed) {
- /* setup for compressed textures */
- GLuint row;
- GLint components, size;
- GLchan *dst;
-
- assert(texObj->Target == GL_TEXTURE_2D);
-
- if (srcImage->_BaseFormat == GL_RGB) {
- convertFormat = &_mesa_texformat_rgb;
- components = 3;
- }
- else if (srcImage->_BaseFormat == GL_RGBA) {
- convertFormat = &_mesa_texformat_rgba;
- components = 4;
- }
- else {
- _mesa_problem(ctx, "bad srcImage->_BaseFormat in _mesa_generate_mipmaps");
- return;
- }
-
- /* allocate storage for uncompressed GL_RGB or GL_RGBA images */
- size = _mesa_bytes_per_pixel(srcImage->_BaseFormat, CHAN_TYPE)
- * srcImage->Width * srcImage->Height * srcImage->Depth + 20;
- /* 20 extra bytes, just be safe when calling last FetchTexel */
- srcData = (GLubyte *) _mesa_malloc(size);
- if (!srcData) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps");
- return;
- }
- dstData = (GLubyte *) _mesa_malloc(size / 2); /* 1/4 would probably be OK */
- if (!dstData) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps");
- _mesa_free((void *) srcData);
- return;
- }
-
- /* decompress base image here */
- dst = (GLchan *) srcData;
- for (row = 0; row < srcImage->Height; row++) {
- GLuint col;
- for (col = 0; col < srcImage->Width; col++) {
- srcImage->FetchTexelc(srcImage, col, row, 0, dst);
- dst += components;
- }
- }
- }
- else {
- /* uncompressed */
- convertFormat = srcImage->TexFormat;
- }
-
- for (level = texObj->BaseLevel; level < texObj->MaxLevel
- && level < maxLevels - 1; level++) {
- /* generate image[level+1] from image[level] */
- const struct gl_texture_image *srcImage;
- struct gl_texture_image *dstImage;
- GLint srcWidth, srcHeight, srcDepth;
- GLint dstWidth, dstHeight, dstDepth;
- GLint border, bytesPerTexel;
-
- /* get src image parameters */
- srcImage = _mesa_select_tex_image(ctx, texUnit, target, level);
- ASSERT(srcImage);
- srcWidth = srcImage->Width;
- srcHeight = srcImage->Height;
- srcDepth = srcImage->Depth;
- border = srcImage->Border;
-
- /* compute next (level+1) image size */
- if (srcWidth - 2 * border > 1) {
- dstWidth = (srcWidth - 2 * border) / 2 + 2 * border;
- }
- else {
- dstWidth = srcWidth; /* can't go smaller */
- }
- if (srcHeight - 2 * border > 1) {
- dstHeight = (srcHeight - 2 * border) / 2 + 2 * border;
- }
- else {
- dstHeight = srcHeight; /* can't go smaller */
- }
- if (srcDepth - 2 * border > 1) {
- dstDepth = (srcDepth - 2 * border) / 2 + 2 * border;
- }
- else {
- dstDepth = srcDepth; /* can't go smaller */
- }
-
- if (dstWidth == srcWidth &&
- dstHeight == srcHeight &&
- dstDepth == srcDepth) {
- /* all done */
- if (srcImage->IsCompressed) {
- _mesa_free((void *) srcData);
- _mesa_free(dstData);
- }
- return;
- }
-
- /* get dest gl_texture_image */
- dstImage = _mesa_get_tex_image(ctx, texUnit, target, level + 1);
- if (!dstImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
-
- /* Free old image data */
- if (dstImage->Data)
- ctx->Driver.FreeTexImageData(ctx, dstImage);
-
- /* initialize new image */
- _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
- dstDepth, border, srcImage->InternalFormat);
- dstImage->DriverData = NULL;
- dstImage->TexFormat = srcImage->TexFormat;
- dstImage->FetchTexelc = srcImage->FetchTexelc;
- dstImage->FetchTexelf = srcImage->FetchTexelf;
- dstImage->IsCompressed = srcImage->IsCompressed;
- if (dstImage->IsCompressed) {
- dstImage->CompressedSize
- = ctx->Driver.CompressedTextureSize(ctx, dstImage->Width,
- dstImage->Height,
- dstImage->Depth,
- dstImage->TexFormat->MesaFormat);
- ASSERT(dstImage->CompressedSize > 0);
- }
-
- ASSERT(dstImage->TexFormat);
- ASSERT(dstImage->FetchTexelc);
- ASSERT(dstImage->FetchTexelf);
-
- /* Alloc new teximage data buffer.
- * Setup src and dest data pointers.
- */
- if (dstImage->IsCompressed) {
- dstImage->Data = _mesa_alloc_texmemory(dstImage->CompressedSize);
- if (!dstImage->Data) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
- /* srcData and dstData are already set */
- ASSERT(srcData);
- ASSERT(dstData);
- }
- else {
- bytesPerTexel = dstImage->TexFormat->TexelBytes;
- ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0);
- dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight
- * dstDepth * bytesPerTexel);
- if (!dstImage->Data) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
- srcData = (const GLubyte *) srcImage->Data;
- dstData = (GLubyte *) dstImage->Data;
- }
-
- /*
- * We use simple 2x2 averaging to compute the next mipmap level.
- */
- switch (target) {
- case GL_TEXTURE_1D:
- make_1d_mipmap(convertFormat, border,
- srcWidth, srcData,
- dstWidth, dstData);
- break;
- case GL_TEXTURE_2D:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
- make_2d_mipmap(convertFormat, border,
- srcWidth, srcHeight, srcData,
- dstWidth, dstHeight, dstData);
- break;
- case GL_TEXTURE_3D:
- make_3d_mipmap(convertFormat, border,
- srcWidth, srcHeight, srcDepth, srcData,
- dstWidth, dstHeight, dstDepth, dstData);
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- /* no mipmaps, do nothing */
- break;
- default:
- _mesa_problem(ctx, "bad dimensions in _mesa_generate_mipmaps");
- return;
- }
-
- if (dstImage->IsCompressed) {
- GLubyte *temp;
- /* compress image from dstData into dstImage->Data */
- const GLenum srcFormat = convertFormat->BaseFormat;
- GLint dstRowStride
- = _mesa_compressed_row_stride(dstImage->TexFormat->MesaFormat, dstWidth);
- ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA);
- dstImage->TexFormat->StoreImage(ctx, 2, dstImage->_BaseFormat,
- dstImage->TexFormat,
- dstImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride, 0, /* strides */
- dstWidth, dstHeight, 1, /* size */
- srcFormat, CHAN_TYPE,
- dstData, /* src data, actually */
- &ctx->DefaultPacking);
- /* swap src and dest pointers */
- temp = (GLubyte *) srcData;
- srcData = dstData;
- dstData = temp;
- }
-
- } /* loop over mipmap levels */
-}
-
-
-/**
- * Helper function for drivers which need to rescale texture images to
- * certain aspect ratios.
- * Nearest filtering only (for broken hardware that can't support
- * all aspect ratios). This can be made a lot faster, but I don't
- * really care enough...
- */
-void
-_mesa_rescale_teximage2d (GLuint bytesPerPixel,
- GLuint srcStrideInPixels,
- GLuint dstRowStride,
- GLint srcWidth, GLint srcHeight,
- GLint dstWidth, GLint dstHeight,
- const GLvoid *srcImage, GLvoid *dstImage)
-{
- GLint row, col;
-
-#define INNER_LOOP( TYPE, HOP, WOP ) \
- for ( row = 0 ; row < dstHeight ; row++ ) { \
- GLint srcRow = row HOP hScale; \
- for ( col = 0 ; col < dstWidth ; col++ ) { \
- GLint srcCol = col WOP wScale; \
- dst[col] = src[srcRow * srcStrideInPixels + srcCol]; \
- } \
- dst = (TYPE *) ((GLubyte *) dst + dstRowStride); \
- } \
-
-#define RESCALE_IMAGE( TYPE ) \
-do { \
- const TYPE *src = (const TYPE *)srcImage; \
- TYPE *dst = (TYPE *)dstImage; \
- \
- if ( srcHeight < dstHeight ) { \
- const GLint hScale = dstHeight / srcHeight; \
- if ( srcWidth < dstWidth ) { \
- const GLint wScale = dstWidth / srcWidth; \
- INNER_LOOP( TYPE, /, / ); \
- } \
- else { \
- const GLint wScale = srcWidth / dstWidth; \
- INNER_LOOP( TYPE, /, * ); \
- } \
- } \
- else { \
- const GLint hScale = srcHeight / dstHeight; \
- if ( srcWidth < dstWidth ) { \
- const GLint wScale = dstWidth / srcWidth; \
- INNER_LOOP( TYPE, *, / ); \
- } \
- else { \
- const GLint wScale = srcWidth / dstWidth; \
- INNER_LOOP( TYPE, *, * ); \
- } \
- } \
-} while (0)
-
- switch ( bytesPerPixel ) {
- case 4:
- RESCALE_IMAGE( GLuint );
- break;
-
- case 2:
- RESCALE_IMAGE( GLushort );
- break;
-
- case 1:
- RESCALE_IMAGE( GLubyte );
- break;
- default:
- _mesa_problem(NULL,"unexpected bytes/pixel in _mesa_rescale_teximage2d");
- }
-}
-
-
-/**
- * Upscale an image by replication, not (typical) stretching.
- * We use this when the image width or height is less than a
- * certain size (4, 8) and we need to upscale an image.
- */
-void
-_mesa_upscale_teximage2d (GLsizei inWidth, GLsizei inHeight,
- GLsizei outWidth, GLsizei outHeight,
- GLint comps, const GLchan *src, GLint srcRowStride,
- GLchan *dest )
-{
- GLint i, j, k;
-
- ASSERT(outWidth >= inWidth);
- ASSERT(outHeight >= inHeight);
-#if 0
- ASSERT(inWidth == 1 || inWidth == 2 || inHeight == 1 || inHeight == 2);
- ASSERT((outWidth & 3) == 0);
- ASSERT((outHeight & 3) == 0);
-#endif
-
- for (i = 0; i < outHeight; i++) {
- const GLint ii = i % inHeight;
- for (j = 0; j < outWidth; j++) {
- const GLint jj = j % inWidth;
- for (k = 0; k < comps; k++) {
- dest[(i * outWidth + j) * comps + k]
- = src[ii * srcRowStride + jj * comps + k];
- }
- }
- }
-}
#if FEATURE_EXT_texture_sRGB
@@ -4381,10 +3608,9 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
for (col = 0; col < width; col++) {
(*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]);
}
- _mesa_pack_rgba_span_float(ctx, width,
- (const GLfloat (*)[4]) rgba,
- format, type, dest, &ctx->Pack,
- 0 /* no image transfer */);
+ _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba,
+ format, type, dest,
+ &ctx->Pack, 0x0 /*image xfer ops*/);
} /* format */
} /* row */
} /* img */
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 7dc82a51c89..f67defc503f 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -201,27 +201,6 @@ _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
extern void
-_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
- const struct gl_texture_unit *texUnit,
- struct gl_texture_object *texObj);
-
-
-extern void
-_mesa_rescale_teximage2d(GLuint bytesPerPixel,
- GLuint srcStrideInPixels,
- GLuint dstRowStride,
- GLint srcWidth, GLint srcHeight,
- GLint dstWidth, GLint dstHeight,
- const GLvoid *srcImage, GLvoid *dstImage);
-
-extern void
-_mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
- GLsizei outWidth, GLsizei outHeight,
- GLint comps, const GLchan *src, GLint srcRowStride,
- GLchan *dest);
-
-
-extern void
_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels,
struct gl_texture_object *texObj,
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 1c01d900192..e6196050b9e 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -30,8 +30,8 @@
/* Mesa version */
#define MESA_MAJOR 6
#define MESA_MINOR 5
-#define MESA_PATCH 1
-#define MESA_VERSION_STRING "6.5.1"
+#define MESA_PATCH 2
+#define MESA_VERSION_STRING "6.5.2"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))