summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-06-12 16:26:29 +0000
committerIan Romanick <idr@us.ibm.com>2006-06-12 16:26:29 +0000
commitee34e6ef716bb630440299ac1efbc2055ef09ffd (patch)
tree561a6314f8115c8dfafc7a3336c89d43f21a301a /src/mesa
parent6254d5904366ae17cb707ee70ff1ce76092f9c81 (diff)
Add support for GL_APPLE_vertex_array_object. Several test programs
and demos are also added. Adding basic support to drivers should be as easy as just enabling the extension, though thorough test would also be required.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/array_cache/ac_context.c2
-rw-r--r--src/mesa/array_cache/ac_import.c40
-rw-r--r--src/mesa/drivers/common/driverfuncs.c6
-rw-r--r--src/mesa/drivers/dri/common/extension_helper.h38
-rw-r--r--src/mesa/glapi/APPLE_vertex_array_object.xml27
-rw-r--r--src/mesa/glapi/dispatch.h30
-rw-r--r--src/mesa/glapi/gl_API.xml2
-rw-r--r--src/mesa/glapi/glapioffsets.h10
-rw-r--r--src/mesa/glapi/glapitable.h4
-rw-r--r--src/mesa/glapi/glapitemp.h24
-rw-r--r--src/mesa/glapi/glprocs.h364
-rw-r--r--src/mesa/main/api_arrayelt.c36
-rw-r--r--src/mesa/main/api_validate.c10
-rw-r--r--src/mesa/main/arrayobj.c426
-rw-r--r--src/mesa/main/arrayobj.h70
-rw-r--r--src/mesa/main/attrib.c52
-rw-r--r--src/mesa/main/bufferobj.c80
-rw-r--r--src/mesa/main/bufferobj.h2
-rw-r--r--src/mesa/main/context.c1
-rw-r--r--src/mesa/main/dd.h10
-rw-r--r--src/mesa/main/dlist.c7
-rw-r--r--src/mesa/main/enable.c40
-rw-r--r--src/mesa/main/enums.c227
-rw-r--r--src/mesa/main/extensions.c2
-rw-r--r--src/mesa/main/get.c306
-rw-r--r--src/mesa/main/get_gen.py102
-rw-r--r--src/mesa/main/getstring.c16
-rw-r--r--src/mesa/main/mtypes.h26
-rw-r--r--src/mesa/main/state.c83
-rw-r--r--src/mesa/main/varray.c90
-rw-r--r--src/mesa/shader/arbprogram.c22
-rw-r--r--src/mesa/shader/nvprogram.c22
-rw-r--r--src/mesa/sources1
-rw-r--r--src/mesa/sparc/glapi_sparc.S8
-rw-r--r--src/mesa/tnl/t_array_import.c2
-rw-r--r--src/mesa/x86-64/glapi_x86-64.S134
-rw-r--r--src/mesa/x86/glapi_x86.S8
37 files changed, 1559 insertions, 771 deletions
diff --git a/src/mesa/array_cache/ac_context.c b/src/mesa/array_cache/ac_context.c
index ff143c13e21..5d5ad5e363b 100644
--- a/src/mesa/array_cache/ac_context.c
+++ b/src/mesa/array_cache/ac_context.c
@@ -292,7 +292,7 @@ static void _ac_raw_init( GLcontext *ctx )
ac->Raw.Index = ac->Fallback.Index;
ac->Raw.Normal = ac->Fallback.Normal;
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
- ac->Raw.Vertex = ctx->Array.Vertex;
+ ac->Raw.Vertex = ctx->Array.ArrayObj->Vertex;
ac->IsCached.Color = GL_FALSE;
ac->IsCached.EdgeFlag = GL_FALSE;
diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c
index 62206002cd3..deae44ab726 100644
--- a/src/mesa/array_cache/ac_import.c
+++ b/src/mesa/array_cache/ac_import.c
@@ -50,8 +50,8 @@ reset_texcoord( GLcontext *ctx, GLuint unit )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.TexCoord[unit].Enabled) {
- ac->Raw.TexCoord[unit] = ctx->Array.TexCoord[unit];
+ if (ctx->Array.ArrayObj->TexCoord[unit].Enabled) {
+ ac->Raw.TexCoord[unit] = ctx->Array.ArrayObj->TexCoord[unit];
STRIDE_ARRAY(ac->Raw.TexCoord[unit], ac->start);
}
else {
@@ -73,9 +73,9 @@ static void
reset_vertex( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- ASSERT(ctx->Array.Vertex.Enabled
- || (ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled));
- ac->Raw.Vertex = ctx->Array.Vertex;
+ ASSERT(ctx->Array.ArrayObj->Vertex.Enabled
+ || (ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled));
+ ac->Raw.Vertex = ctx->Array.ArrayObj->Vertex;
STRIDE_ARRAY(ac->Raw.Vertex, ac->start);
ac->IsCached.Vertex = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_VERTEX;
@@ -87,8 +87,8 @@ reset_normal( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.Normal.Enabled) {
- ac->Raw.Normal = ctx->Array.Normal;
+ if (ctx->Array.ArrayObj->Normal.Enabled) {
+ ac->Raw.Normal = ctx->Array.ArrayObj->Normal;
STRIDE_ARRAY(ac->Raw.Normal, ac->start);
}
else {
@@ -105,8 +105,8 @@ reset_color( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.Color.Enabled) {
- ac->Raw.Color = ctx->Array.Color;
+ if (ctx->Array.ArrayObj->Color.Enabled) {
+ ac->Raw.Color = ctx->Array.ArrayObj->Color;
STRIDE_ARRAY(ac->Raw.Color, ac->start);
}
else
@@ -122,8 +122,8 @@ reset_secondarycolor( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.SecondaryColor.Enabled) {
- ac->Raw.SecondaryColor = ctx->Array.SecondaryColor;
+ if (ctx->Array.ArrayObj->SecondaryColor.Enabled) {
+ ac->Raw.SecondaryColor = ctx->Array.ArrayObj->SecondaryColor;
STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start);
}
else
@@ -139,8 +139,8 @@ reset_index( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.Index.Enabled) {
- ac->Raw.Index = ctx->Array.Index;
+ if (ctx->Array.ArrayObj->Index.Enabled) {
+ ac->Raw.Index = ctx->Array.ArrayObj->Index;
STRIDE_ARRAY(ac->Raw.Index, ac->start);
}
else
@@ -156,8 +156,8 @@ reset_fogcoord( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.FogCoord.Enabled) {
- ac->Raw.FogCoord = ctx->Array.FogCoord;
+ if (ctx->Array.ArrayObj->FogCoord.Enabled) {
+ ac->Raw.FogCoord = ctx->Array.ArrayObj->FogCoord;
STRIDE_ARRAY(ac->Raw.FogCoord, ac->start);
}
else
@@ -173,8 +173,8 @@ reset_edgeflag( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.EdgeFlag.Enabled) {
- ac->Raw.EdgeFlag = ctx->Array.EdgeFlag;
+ if (ctx->Array.ArrayObj->EdgeFlag.Enabled) {
+ ac->Raw.EdgeFlag = ctx->Array.ArrayObj->EdgeFlag;
STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start);
}
else
@@ -190,8 +190,8 @@ reset_attrib( GLcontext *ctx, GLuint index )
{
ACcontext *ac = AC_CONTEXT(ctx);
- if (ctx->Array.VertexAttrib[index].Enabled) {
- ac->Raw.Attrib[index] = ctx->Array.VertexAttrib[index];
+ if (ctx->Array.ArrayObj->VertexAttrib[index].Enabled) {
+ ac->Raw.Attrib[index] = ctx->Array.ArrayObj->VertexAttrib[index];
STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start);
}
else
@@ -831,7 +831,7 @@ _ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
* the whole locked range always be dealt with, otherwise hard to
* maintain cached data in the face of clipping.
*/
- ac->NewArrayState |= ~ctx->Array._Enabled;
+ ac->NewArrayState |= ~ctx->Array.ArrayObj->_Enabled;
ac->start = ctx->Array.LockFirst;
ac->count = ctx->Array.LockCount;
ASSERT(ac->start == start); /* hmm? */
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 9838e0b5ec0..3ccbe54817a 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -43,6 +43,7 @@
#include "fbobject.h"
#include "texrender.h"
#endif
+#include "arrayobj.h"
#include "driverfuncs.h"
#include "tnl/tnl.h"
@@ -220,6 +221,11 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->BeginQuery = NULL;
driver->EndQuery = NULL;
+ /* APPLE_vertex_array_object */
+ driver->NewArrayObject = _mesa_new_array_object;
+ driver->DeleteArrayObject = _mesa_delete_array_object;
+ driver->BindArrayObject = NULL;
+
/* T&L stuff */
driver->NeedValidate = GL_FALSE;
driver->ValidateTnlModule = NULL;
diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h
index c21607c6beb..6c8f71d66a3 100644
--- a/src/mesa/drivers/dri/common/extension_helper.h
+++ b/src/mesa/drivers/dri/common/extension_helper.h
@@ -397,6 +397,13 @@ static const char UniformMatrix4fvARB_names[] =
"";
#endif
+#if defined(need_GL_APPLE_vertex_array_object)
+static const char DeleteVertexArraysAPPLE_names[] =
+ "ip\0" /* Parameter signature */
+ "glDeleteVertexArraysAPPLE\0"
+ "";
+#endif
+
#if defined(need_GL_SGIX_instruments)
static const char ReadInstrumentsSGIX_names[] =
"i\0" /* Parameter signature */
@@ -2472,6 +2479,13 @@ static const char ReplacementCodeuivSUN_names[] =
"";
#endif
+#if defined(need_GL_APPLE_vertex_array_object)
+static const char GenVertexArraysAPPLE_names[] =
+ "ip\0" /* Parameter signature */
+ "glGenVertexArraysAPPLE\0"
+ "";
+#endif
+
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
static const char WindowPos2iMESA_names[] =
"ii\0" /* Parameter signature */
@@ -3775,6 +3789,13 @@ static const char TexCoord4fVertex4fSUN_names[] =
"";
#endif
+#if defined(need_GL_APPLE_vertex_array_object)
+static const char BindVertexArrayAPPLE_names[] =
+ "i\0" /* Parameter signature */
+ "glBindVertexArrayAPPLE\0"
+ "";
+#endif
+
#if defined(need_GL_ARB_vertex_program)
static const char GetProgramLocalParameterdvARB_names[] =
"iip\0" /* Parameter signature */
@@ -3806,6 +3827,13 @@ static const char BlendFuncSeparateEXT_names[] =
"";
#endif
+#if defined(need_GL_APPLE_vertex_array_object)
+static const char IsVertexArrayAPPLE_names[] =
+ "i\0" /* Parameter signature */
+ "glIsVertexArrayAPPLE\0"
+ "";
+#endif
+
#if defined(need_GL_NV_vertex_program)
static const char ProgramParameters4dvNV_names[] =
"iiip\0" /* Parameter signature */
@@ -4606,6 +4634,16 @@ static const struct dri_extension_function GL_3DFX_tbuffer_functions[] = {
};
#endif
+#if defined(need_GL_APPLE_vertex_array_object)
+static const struct dri_extension_function GL_APPLE_vertex_array_object_functions[] = {
+ { DeleteVertexArraysAPPLE_names, DeleteVertexArraysAPPLE_remap_index, 820 },
+ { GenVertexArraysAPPLE_names, GenVertexArraysAPPLE_remap_index, 821 },
+ { BindVertexArrayAPPLE_names, BindVertexArrayAPPLE_remap_index, 819 },
+ { IsVertexArrayAPPLE_names, IsVertexArrayAPPLE_remap_index, 822 },
+ { NULL, 0, 0 }
+};
+#endif
+
#if defined(need_GL_ARB_draw_buffers)
static const struct dri_extension_function GL_ARB_draw_buffers_functions[] = {
{ DrawBuffersARB_names, DrawBuffersARB_remap_index, 413 },
diff --git a/src/mesa/glapi/APPLE_vertex_array_object.xml b/src/mesa/glapi/APPLE_vertex_array_object.xml
new file mode 100644
index 00000000000..3c0c1cc57f8
--- /dev/null
+++ b/src/mesa/glapi/APPLE_vertex_array_object.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+<category name="GL_APPLE_vertex_array_object" number="273">
+ <enum name="VERTEX_ARRAY_BINDING_APPLE" value="0x85B5"/>
+
+ <function name="BindVertexArrayAPPLE" offset="819">
+ <param name="array" type="GLuint"/>
+ </function>
+
+ <function name="DeleteVertexArraysAPPLE" offset="820">
+ <param name="n" type="GLsizei"/>
+ <param name="arrays" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="GenVertexArraysAPPLE" offset="821">
+ <param name="n" type="GLsizei"/>
+ <param name="arrays" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="IsVertexArrayAPPLE" offset="822">
+ <param name="array" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+</category>
+</OpenGLAPI>
diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h
index d1d21beb458..cccfc3f0aa5 100644
--- a/src/mesa/glapi/dispatch.h
+++ b/src/mesa/glapi/dispatch.h
@@ -2515,10 +2515,22 @@
#define CALL_BlitFramebufferEXT(disp, parameters) (*((disp)->BlitFramebufferEXT)) parameters
#define GET_BlitFramebufferEXT(disp) ((disp)->BlitFramebufferEXT)
#define SET_BlitFramebufferEXT(disp, fn) ((disp)->BlitFramebufferEXT = fn)
+#define CALL_BindVertexArrayAPPLE(disp, parameters) (*((disp)->BindVertexArrayAPPLE)) parameters
+#define GET_BindVertexArrayAPPLE(disp) ((disp)->BindVertexArrayAPPLE)
+#define SET_BindVertexArrayAPPLE(disp, fn) ((disp)->BindVertexArrayAPPLE = fn)
+#define CALL_DeleteVertexArraysAPPLE(disp, parameters) (*((disp)->DeleteVertexArraysAPPLE)) parameters
+#define GET_DeleteVertexArraysAPPLE(disp) ((disp)->DeleteVertexArraysAPPLE)
+#define SET_DeleteVertexArraysAPPLE(disp, fn) ((disp)->DeleteVertexArraysAPPLE = fn)
+#define CALL_GenVertexArraysAPPLE(disp, parameters) (*((disp)->GenVertexArraysAPPLE)) parameters
+#define GET_GenVertexArraysAPPLE(disp) ((disp)->GenVertexArraysAPPLE)
+#define SET_GenVertexArraysAPPLE(disp, fn) ((disp)->GenVertexArraysAPPLE = fn)
+#define CALL_IsVertexArrayAPPLE(disp, parameters) (*((disp)->IsVertexArrayAPPLE)) parameters
+#define GET_IsVertexArrayAPPLE(disp) ((disp)->IsVertexArrayAPPLE)
+#define SET_IsVertexArrayAPPLE(disp, fn) ((disp)->IsVertexArrayAPPLE = fn)
#else
-#define driDispatchRemapTable_size 411
+#define driDispatchRemapTable_size 415
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define LoadTransposeMatrixfARB_remap_index 0
@@ -2932,6 +2944,10 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define GetQueryObjecti64vEXT_remap_index 408
#define GetQueryObjectui64vEXT_remap_index 409
#define BlitFramebufferEXT_remap_index 410
+#define BindVertexArrayAPPLE_remap_index 411
+#define DeleteVertexArraysAPPLE_remap_index 412
+#define GenVertexArraysAPPLE_remap_index 413
+#define IsVertexArrayAPPLE_remap_index 414
#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index], parameters)
#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index])
@@ -4166,6 +4182,18 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), driDispatchRemapTable[BlitFramebufferEXT_remap_index], parameters)
#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index])
#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index], fn)
+#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[BindVertexArrayAPPLE_remap_index], parameters)
+#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[BindVertexArrayAPPLE_remap_index])
+#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindVertexArrayAPPLE_remap_index], fn)
+#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index], parameters)
+#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index])
+#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index], fn)
+#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenVertexArraysAPPLE_remap_index], parameters)
+#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[GenVertexArraysAPPLE_remap_index])
+#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenVertexArraysAPPLE_remap_index], fn)
+#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsVertexArrayAPPLE_remap_index], parameters)
+#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[IsVertexArrayAPPLE_remap_index])
+#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsVertexArrayAPPLE_remap_index], fn)
#endif /* !defined(IN_DRI_DRIVER) */
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml
index 9fb99e381a4..eb284aee34a 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gl_API.xml
@@ -11124,6 +11124,8 @@
</function>
</category>
+<xi:include href="APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<category name="GL_APPLE_ycbcr_422" number="275">
<enum name="YCBCR_422_APPLE" value="0x85B9"/>
<enum name="UNSIGNED_SHORT_8_8_APPLE" value="0x85BA"/>
diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h
index dfa927f7b24..9d3e8960ba4 100644
--- a/src/mesa/glapi/glapioffsets.h
+++ b/src/mesa/glapi/glapioffsets.h
@@ -851,7 +851,11 @@
#define _gloffset_GetQueryObjecti64vEXT 816
#define _gloffset_GetQueryObjectui64vEXT 817
#define _gloffset_BlitFramebufferEXT 818
-#define _gloffset_FIRST_DYNAMIC 819
+#define _gloffset_BindVertexArrayAPPLE 819
+#define _gloffset_DeleteVertexArraysAPPLE 820
+#define _gloffset_GenVertexArraysAPPLE 821
+#define _gloffset_IsVertexArrayAPPLE 822
+#define _gloffset_FIRST_DYNAMIC 823
#else
@@ -1266,6 +1270,10 @@
#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index]
+#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]
+#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]
+#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]
+#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]
#endif /* !defined(IN_DRI_DRIVER) */
diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h
index c672e7e40d7..d35630043b7 100644
--- a/src/mesa/glapi/glapitable.h
+++ b/src/mesa/glapi/glapitable.h
@@ -856,6 +856,10 @@ struct _glapi_table
void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 816 */
void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 817 */
void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 818 */
+ void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 819 */
+ void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 820 */
+ void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 821 */
+ GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 822 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index a4494099e37..50c19aec1d6 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -5055,6 +5055,26 @@ KEYWORD1 void KEYWORD2 NAME(BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint
DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
}
+KEYWORD1 void KEYWORD2 NAME(BindVertexArrayAPPLE)(GLuint array)
+{
+ DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays)
+{
+ DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays)
+{
+ DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsVertexArrayAPPLE)(GLuint array)
+{
+ RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array));
+}
+
#endif /* defined( NAME ) */
@@ -5888,6 +5908,10 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(GetQueryObjecti64vEXT),
TABLE_ENTRY(GetQueryObjectui64vEXT),
TABLE_ENTRY(BlitFramebufferEXT),
+ TABLE_ENTRY(BindVertexArrayAPPLE),
+ TABLE_ENTRY(DeleteVertexArraysAPPLE),
+ TABLE_ENTRY(GenVertexArraysAPPLE),
+ TABLE_ENTRY(IsVertexArrayAPPLE),
/* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered
* extension function without a current rendering context.
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index b41c4185613..1c72f6fd2da 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -865,6 +865,10 @@ static const char gl_string_table[] =
"glGetQueryObjecti64vEXT\0"
"glGetQueryObjectui64vEXT\0"
"glBlitFramebufferEXT\0"
+ "glBindVertexArrayAPPLE\0"
+ "glDeleteVertexArraysAPPLE\0"
+ "glGenVertexArraysAPPLE\0"
+ "glIsVertexArrayAPPLE\0"
"glArrayElementEXT\0"
"glBindTextureEXT\0"
"glDrawArraysEXT\0"
@@ -1865,184 +1869,188 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET( 14671, glGetQueryObjecti64vEXT, _gloffset_GetQueryObjecti64vEXT ),
NAME_FUNC_OFFSET( 14695, glGetQueryObjectui64vEXT, _gloffset_GetQueryObjectui64vEXT ),
NAME_FUNC_OFFSET( 14720, glBlitFramebufferEXT, _gloffset_BlitFramebufferEXT ),
- NAME_FUNC_OFFSET( 14741, glArrayElementEXT, _gloffset_ArrayElement ),
- NAME_FUNC_OFFSET( 14759, glBindTextureEXT, _gloffset_BindTexture ),
- NAME_FUNC_OFFSET( 14776, glDrawArraysEXT, _gloffset_DrawArrays ),
- NAME_FUNC_OFFSET( 14792, glCopyTexImage1DEXT, _gloffset_CopyTexImage1D ),
- NAME_FUNC_OFFSET( 14812, glCopyTexImage2DEXT, _gloffset_CopyTexImage2D ),
- NAME_FUNC_OFFSET( 14832, glCopyTexSubImage1DEXT, _gloffset_CopyTexSubImage1D ),
- NAME_FUNC_OFFSET( 14855, glCopyTexSubImage2DEXT, _gloffset_CopyTexSubImage2D ),
- NAME_FUNC_OFFSET( 14878, glDeleteTexturesEXT, _gloffset_DeleteTextures ),
- NAME_FUNC_OFFSET( 14898, glGetPointervEXT, _gloffset_GetPointerv ),
- NAME_FUNC_OFFSET( 14915, glPrioritizeTexturesEXT, _gloffset_PrioritizeTextures ),
- NAME_FUNC_OFFSET( 14939, glTexSubImage1DEXT, _gloffset_TexSubImage1D ),
- NAME_FUNC_OFFSET( 14958, glTexSubImage2DEXT, _gloffset_TexSubImage2D ),
- NAME_FUNC_OFFSET( 14977, glBlendColorEXT, _gloffset_BlendColor ),
- NAME_FUNC_OFFSET( 14993, glBlendEquationEXT, _gloffset_BlendEquation ),
- NAME_FUNC_OFFSET( 15012, glDrawRangeElementsEXT, _gloffset_DrawRangeElements ),
- NAME_FUNC_OFFSET( 15035, glColorTableSGI, _gloffset_ColorTable ),
- NAME_FUNC_OFFSET( 15051, glColorTableEXT, _gloffset_ColorTable ),
- NAME_FUNC_OFFSET( 15067, glColorTableParameterfvSGI, _gloffset_ColorTableParameterfv ),
- NAME_FUNC_OFFSET( 15094, glColorTableParameterivSGI, _gloffset_ColorTableParameteriv ),
- NAME_FUNC_OFFSET( 15121, glCopyColorTableSGI, _gloffset_CopyColorTable ),
- NAME_FUNC_OFFSET( 15141, glColorSubTableEXT, _gloffset_ColorSubTable ),
- NAME_FUNC_OFFSET( 15160, glCopyColorSubTableEXT, _gloffset_CopyColorSubTable ),
- NAME_FUNC_OFFSET( 15183, glConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D ),
- NAME_FUNC_OFFSET( 15208, glConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D ),
- NAME_FUNC_OFFSET( 15233, glConvolutionParameterfEXT, _gloffset_ConvolutionParameterf ),
- NAME_FUNC_OFFSET( 15260, glConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv ),
- NAME_FUNC_OFFSET( 15288, glConvolutionParameteriEXT, _gloffset_ConvolutionParameteri ),
- NAME_FUNC_OFFSET( 15315, glConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv ),
- NAME_FUNC_OFFSET( 15343, glCopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D ),
- NAME_FUNC_OFFSET( 15372, glCopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D ),
- NAME_FUNC_OFFSET( 15401, glSeparableFilter2DEXT, _gloffset_SeparableFilter2D ),
- NAME_FUNC_OFFSET( 15424, glHistogramEXT, _gloffset_Histogram ),
- NAME_FUNC_OFFSET( 15439, glMinmaxEXT, _gloffset_Minmax ),
- NAME_FUNC_OFFSET( 15451, glResetHistogramEXT, _gloffset_ResetHistogram ),
- NAME_FUNC_OFFSET( 15471, glResetMinmaxEXT, _gloffset_ResetMinmax ),
- NAME_FUNC_OFFSET( 15488, glTexImage3DEXT, _gloffset_TexImage3D ),
- NAME_FUNC_OFFSET( 15504, glTexSubImage3DEXT, _gloffset_TexSubImage3D ),
- NAME_FUNC_OFFSET( 15523, glCopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D ),
- NAME_FUNC_OFFSET( 15546, glActiveTexture, _gloffset_ActiveTextureARB ),
- NAME_FUNC_OFFSET( 15562, glClientActiveTexture, _gloffset_ClientActiveTextureARB ),
- NAME_FUNC_OFFSET( 15584, glMultiTexCoord1d, _gloffset_MultiTexCoord1dARB ),
- NAME_FUNC_OFFSET( 15602, glMultiTexCoord1dv, _gloffset_MultiTexCoord1dvARB ),
- NAME_FUNC_OFFSET( 15621, glMultiTexCoord1f, _gloffset_MultiTexCoord1fARB ),
- NAME_FUNC_OFFSET( 15639, glMultiTexCoord1fv, _gloffset_MultiTexCoord1fvARB ),
- NAME_FUNC_OFFSET( 15658, glMultiTexCoord1i, _gloffset_MultiTexCoord1iARB ),
- NAME_FUNC_OFFSET( 15676, glMultiTexCoord1iv, _gloffset_MultiTexCoord1ivARB ),
- NAME_FUNC_OFFSET( 15695, glMultiTexCoord1s, _gloffset_MultiTexCoord1sARB ),
- NAME_FUNC_OFFSET( 15713, glMultiTexCoord1sv, _gloffset_MultiTexCoord1svARB ),
- NAME_FUNC_OFFSET( 15732, glMultiTexCoord2d, _gloffset_MultiTexCoord2dARB ),
- NAME_FUNC_OFFSET( 15750, glMultiTexCoord2dv, _gloffset_MultiTexCoord2dvARB ),
- NAME_FUNC_OFFSET( 15769, glMultiTexCoord2f, _gloffset_MultiTexCoord2fARB ),
- NAME_FUNC_OFFSET( 15787, glMultiTexCoord2fv, _gloffset_MultiTexCoord2fvARB ),
- NAME_FUNC_OFFSET( 15806, glMultiTexCoord2i, _gloffset_MultiTexCoord2iARB ),
- NAME_FUNC_OFFSET( 15824, glMultiTexCoord2iv, _gloffset_MultiTexCoord2ivARB ),
- NAME_FUNC_OFFSET( 15843, glMultiTexCoord2s, _gloffset_MultiTexCoord2sARB ),
- NAME_FUNC_OFFSET( 15861, glMultiTexCoord2sv, _gloffset_MultiTexCoord2svARB ),
- NAME_FUNC_OFFSET( 15880, glMultiTexCoord3d, _gloffset_MultiTexCoord3dARB ),
- NAME_FUNC_OFFSET( 15898, glMultiTexCoord3dv, _gloffset_MultiTexCoord3dvARB ),
- NAME_FUNC_OFFSET( 15917, glMultiTexCoord3f, _gloffset_MultiTexCoord3fARB ),
- NAME_FUNC_OFFSET( 15935, glMultiTexCoord3fv, _gloffset_MultiTexCoord3fvARB ),
- NAME_FUNC_OFFSET( 15954, glMultiTexCoord3i, _gloffset_MultiTexCoord3iARB ),
- NAME_FUNC_OFFSET( 15972, glMultiTexCoord3iv, _gloffset_MultiTexCoord3ivARB ),
- NAME_FUNC_OFFSET( 15991, glMultiTexCoord3s, _gloffset_MultiTexCoord3sARB ),
- NAME_FUNC_OFFSET( 16009, glMultiTexCoord3sv, _gloffset_MultiTexCoord3svARB ),
- NAME_FUNC_OFFSET( 16028, glMultiTexCoord4d, _gloffset_MultiTexCoord4dARB ),
- NAME_FUNC_OFFSET( 16046, glMultiTexCoord4dv, _gloffset_MultiTexCoord4dvARB ),
- NAME_FUNC_OFFSET( 16065, glMultiTexCoord4f, _gloffset_MultiTexCoord4fARB ),
- NAME_FUNC_OFFSET( 16083, glMultiTexCoord4fv, _gloffset_MultiTexCoord4fvARB ),
- NAME_FUNC_OFFSET( 16102, glMultiTexCoord4i, _gloffset_MultiTexCoord4iARB ),
- NAME_FUNC_OFFSET( 16120, glMultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB ),
- NAME_FUNC_OFFSET( 16139, glMultiTexCoord4s, _gloffset_MultiTexCoord4sARB ),
- NAME_FUNC_OFFSET( 16157, glMultiTexCoord4sv, _gloffset_MultiTexCoord4svARB ),
- NAME_FUNC_OFFSET( 16176, glLoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB ),
- NAME_FUNC_OFFSET( 16199, glLoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB ),
- NAME_FUNC_OFFSET( 16222, glMultTransposeMatrixf, _gloffset_MultTransposeMatrixfARB ),
- NAME_FUNC_OFFSET( 16245, glMultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB ),
- NAME_FUNC_OFFSET( 16268, glSampleCoverage, _gloffset_SampleCoverageARB ),
- NAME_FUNC_OFFSET( 16285, glDrawBuffersATI, _gloffset_DrawBuffersARB ),
- NAME_FUNC_OFFSET( 16302, glSampleMaskEXT, _gloffset_SampleMaskSGIS ),
- NAME_FUNC_OFFSET( 16318, glSamplePatternEXT, _gloffset_SamplePatternSGIS ),
- NAME_FUNC_OFFSET( 16337, glPointParameterf, _gloffset_PointParameterfEXT ),
- NAME_FUNC_OFFSET( 16355, glPointParameterfARB, _gloffset_PointParameterfEXT ),
- NAME_FUNC_OFFSET( 16376, glPointParameterfSGIS, _gloffset_PointParameterfEXT ),
- NAME_FUNC_OFFSET( 16398, glPointParameterfv, _gloffset_PointParameterfvEXT ),
- NAME_FUNC_OFFSET( 16417, glPointParameterfvARB, _gloffset_PointParameterfvEXT ),
- NAME_FUNC_OFFSET( 16439, glPointParameterfvSGIS, _gloffset_PointParameterfvEXT ),
- NAME_FUNC_OFFSET( 16462, glWindowPos2d, _gloffset_WindowPos2dMESA ),
- NAME_FUNC_OFFSET( 16476, glWindowPos2dARB, _gloffset_WindowPos2dMESA ),
- NAME_FUNC_OFFSET( 16493, glWindowPos2dv, _gloffset_WindowPos2dvMESA ),
- NAME_FUNC_OFFSET( 16508, glWindowPos2dvARB, _gloffset_WindowPos2dvMESA ),
- NAME_FUNC_OFFSET( 16526, glWindowPos2f, _gloffset_WindowPos2fMESA ),
- NAME_FUNC_OFFSET( 16540, glWindowPos2fARB, _gloffset_WindowPos2fMESA ),
- NAME_FUNC_OFFSET( 16557, glWindowPos2fv, _gloffset_WindowPos2fvMESA ),
- NAME_FUNC_OFFSET( 16572, glWindowPos2fvARB, _gloffset_WindowPos2fvMESA ),
- NAME_FUNC_OFFSET( 16590, glWindowPos2i, _gloffset_WindowPos2iMESA ),
- NAME_FUNC_OFFSET( 16604, glWindowPos2iARB, _gloffset_WindowPos2iMESA ),
- NAME_FUNC_OFFSET( 16621, glWindowPos2iv, _gloffset_WindowPos2ivMESA ),
- NAME_FUNC_OFFSET( 16636, glWindowPos2ivARB, _gloffset_WindowPos2ivMESA ),
- NAME_FUNC_OFFSET( 16654, glWindowPos2s, _gloffset_WindowPos2sMESA ),
- NAME_FUNC_OFFSET( 16668, glWindowPos2sARB, _gloffset_WindowPos2sMESA ),
- NAME_FUNC_OFFSET( 16685, glWindowPos2sv, _gloffset_WindowPos2svMESA ),
- NAME_FUNC_OFFSET( 16700, glWindowPos2svARB, _gloffset_WindowPos2svMESA ),
- NAME_FUNC_OFFSET( 16718, glWindowPos3d, _gloffset_WindowPos3dMESA ),
- NAME_FUNC_OFFSET( 16732, glWindowPos3dARB, _gloffset_WindowPos3dMESA ),
- NAME_FUNC_OFFSET( 16749, glWindowPos3dv, _gloffset_WindowPos3dvMESA ),
- NAME_FUNC_OFFSET( 16764, glWindowPos3dvARB, _gloffset_WindowPos3dvMESA ),
- NAME_FUNC_OFFSET( 16782, glWindowPos3f, _gloffset_WindowPos3fMESA ),
- NAME_FUNC_OFFSET( 16796, glWindowPos3fARB, _gloffset_WindowPos3fMESA ),
- NAME_FUNC_OFFSET( 16813, glWindowPos3fv, _gloffset_WindowPos3fvMESA ),
- NAME_FUNC_OFFSET( 16828, glWindowPos3fvARB, _gloffset_WindowPos3fvMESA ),
- NAME_FUNC_OFFSET( 16846, glWindowPos3i, _gloffset_WindowPos3iMESA ),
- NAME_FUNC_OFFSET( 16860, glWindowPos3iARB, _gloffset_WindowPos3iMESA ),
- NAME_FUNC_OFFSET( 16877, glWindowPos3iv, _gloffset_WindowPos3ivMESA ),
- NAME_FUNC_OFFSET( 16892, glWindowPos3ivARB, _gloffset_WindowPos3ivMESA ),
- NAME_FUNC_OFFSET( 16910, glWindowPos3s, _gloffset_WindowPos3sMESA ),
- NAME_FUNC_OFFSET( 16924, glWindowPos3sARB, _gloffset_WindowPos3sMESA ),
- NAME_FUNC_OFFSET( 16941, glWindowPos3sv, _gloffset_WindowPos3svMESA ),
- NAME_FUNC_OFFSET( 16956, glWindowPos3svARB, _gloffset_WindowPos3svMESA ),
- NAME_FUNC_OFFSET( 16974, glBlendFuncSeparate, _gloffset_BlendFuncSeparateEXT ),
- NAME_FUNC_OFFSET( 16994, glBlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT ),
- NAME_FUNC_OFFSET( 17018, glFogCoordf, _gloffset_FogCoordfEXT ),
- NAME_FUNC_OFFSET( 17030, glFogCoordfv, _gloffset_FogCoordfvEXT ),
- NAME_FUNC_OFFSET( 17043, glFogCoordd, _gloffset_FogCoorddEXT ),
- NAME_FUNC_OFFSET( 17055, glFogCoorddv, _gloffset_FogCoorddvEXT ),
- NAME_FUNC_OFFSET( 17068, glFogCoordPointer, _gloffset_FogCoordPointerEXT ),
- NAME_FUNC_OFFSET( 17086, glCompressedTexImage3D, _gloffset_CompressedTexImage3DARB ),
- NAME_FUNC_OFFSET( 17109, glCompressedTexImage2D, _gloffset_CompressedTexImage2DARB ),
- NAME_FUNC_OFFSET( 17132, glCompressedTexImage1D, _gloffset_CompressedTexImage1DARB ),
- NAME_FUNC_OFFSET( 17155, glCompressedTexSubImage3D, _gloffset_CompressedTexSubImage3DARB ),
- NAME_FUNC_OFFSET( 17181, glCompressedTexSubImage2D, _gloffset_CompressedTexSubImage2DARB ),
- NAME_FUNC_OFFSET( 17207, glCompressedTexSubImage1D, _gloffset_CompressedTexSubImage1DARB ),
- NAME_FUNC_OFFSET( 17233, glGetCompressedTexImage, _gloffset_GetCompressedTexImageARB ),
- NAME_FUNC_OFFSET( 17257, glSecondaryColor3b, _gloffset_SecondaryColor3bEXT ),
- NAME_FUNC_OFFSET( 17276, glSecondaryColor3bv, _gloffset_SecondaryColor3bvEXT ),
- NAME_FUNC_OFFSET( 17296, glSecondaryColor3d, _gloffset_SecondaryColor3dEXT ),
- NAME_FUNC_OFFSET( 17315, glSecondaryColor3dv, _gloffset_SecondaryColor3dvEXT ),
- NAME_FUNC_OFFSET( 17335, glSecondaryColor3f, _gloffset_SecondaryColor3fEXT ),
- NAME_FUNC_OFFSET( 17354, glSecondaryColor3fv, _gloffset_SecondaryColor3fvEXT ),
- NAME_FUNC_OFFSET( 17374, glSecondaryColor3i, _gloffset_SecondaryColor3iEXT ),
- NAME_FUNC_OFFSET( 17393, glSecondaryColor3iv, _gloffset_SecondaryColor3ivEXT ),
- NAME_FUNC_OFFSET( 17413, glSecondaryColor3s, _gloffset_SecondaryColor3sEXT ),
- NAME_FUNC_OFFSET( 17432, glSecondaryColor3sv, _gloffset_SecondaryColor3svEXT ),
- NAME_FUNC_OFFSET( 17452, glSecondaryColor3ub, _gloffset_SecondaryColor3ubEXT ),
- NAME_FUNC_OFFSET( 17472, glSecondaryColor3ubv, _gloffset_SecondaryColor3ubvEXT ),
- NAME_FUNC_OFFSET( 17493, glSecondaryColor3ui, _gloffset_SecondaryColor3uiEXT ),
- NAME_FUNC_OFFSET( 17513, glSecondaryColor3uiv, _gloffset_SecondaryColor3uivEXT ),
- NAME_FUNC_OFFSET( 17534, glSecondaryColor3us, _gloffset_SecondaryColor3usEXT ),
- NAME_FUNC_OFFSET( 17554, glSecondaryColor3usv, _gloffset_SecondaryColor3usvEXT ),
- NAME_FUNC_OFFSET( 17575, glSecondaryColorPointer, _gloffset_SecondaryColorPointerEXT ),
- NAME_FUNC_OFFSET( 17599, glBindProgramARB, _gloffset_BindProgramNV ),
- NAME_FUNC_OFFSET( 17616, glDeleteProgramsARB, _gloffset_DeleteProgramsNV ),
- NAME_FUNC_OFFSET( 17636, glGenProgramsARB, _gloffset_GenProgramsNV ),
- NAME_FUNC_OFFSET( 17653, glGetVertexAttribPointervARB, _gloffset_GetVertexAttribPointervNV ),
- NAME_FUNC_OFFSET( 17682, glIsProgramARB, _gloffset_IsProgramNV ),
- NAME_FUNC_OFFSET( 17697, glPointParameteri, _gloffset_PointParameteriNV ),
- NAME_FUNC_OFFSET( 17715, glPointParameteriv, _gloffset_PointParameterivNV ),
- NAME_FUNC_OFFSET( 17734, glMultiDrawArrays, _gloffset_MultiDrawArraysEXT ),
- NAME_FUNC_OFFSET( 17752, glMultiDrawElements, _gloffset_MultiDrawElementsEXT ),
- NAME_FUNC_OFFSET( 17772, glBindBuffer, _gloffset_BindBufferARB ),
- NAME_FUNC_OFFSET( 17785, glBufferData, _gloffset_BufferDataARB ),
- NAME_FUNC_OFFSET( 17798, glBufferSubData, _gloffset_BufferSubDataARB ),
- NAME_FUNC_OFFSET( 17814, glDeleteBuffers, _gloffset_DeleteBuffersARB ),
- NAME_FUNC_OFFSET( 17830, glGenBuffers, _gloffset_GenBuffersARB ),
- NAME_FUNC_OFFSET( 17843, glGetBufferParameteriv, _gloffset_GetBufferParameterivARB ),
- NAME_FUNC_OFFSET( 17866, glGetBufferPointerv, _gloffset_GetBufferPointervARB ),
- NAME_FUNC_OFFSET( 17886, glGetBufferSubData, _gloffset_GetBufferSubDataARB ),
- NAME_FUNC_OFFSET( 17905, glIsBuffer, _gloffset_IsBufferARB ),
- NAME_FUNC_OFFSET( 17916, glMapBuffer, _gloffset_MapBufferARB ),
- NAME_FUNC_OFFSET( 17928, glUnmapBuffer, _gloffset_UnmapBufferARB ),
- NAME_FUNC_OFFSET( 17942, glGenQueries, _gloffset_GenQueriesARB ),
- NAME_FUNC_OFFSET( 17955, glDeleteQueries, _gloffset_DeleteQueriesARB ),
- NAME_FUNC_OFFSET( 17971, glIsQuery, _gloffset_IsQueryARB ),
- NAME_FUNC_OFFSET( 17981, glBeginQuery, _gloffset_BeginQueryARB ),
- NAME_FUNC_OFFSET( 17994, glEndQuery, _gloffset_EndQueryARB ),
- NAME_FUNC_OFFSET( 18005, glGetQueryiv, _gloffset_GetQueryivARB ),
- NAME_FUNC_OFFSET( 18018, glGetQueryObjectiv, _gloffset_GetQueryObjectivARB ),
- NAME_FUNC_OFFSET( 18037, glGetQueryObjectuiv, _gloffset_GetQueryObjectuivARB ),
- NAME_FUNC_OFFSET( 18057, glBlendEquationSeparateATI, _gloffset_BlendEquationSeparateEXT ),
+ NAME_FUNC_OFFSET( 14741, glBindVertexArrayAPPLE, _gloffset_BindVertexArrayAPPLE ),
+ NAME_FUNC_OFFSET( 14764, glDeleteVertexArraysAPPLE, _gloffset_DeleteVertexArraysAPPLE ),
+ NAME_FUNC_OFFSET( 14790, glGenVertexArraysAPPLE, _gloffset_GenVertexArraysAPPLE ),
+ NAME_FUNC_OFFSET( 14813, glIsVertexArrayAPPLE, _gloffset_IsVertexArrayAPPLE ),
+ NAME_FUNC_OFFSET( 14834, glArrayElementEXT, _gloffset_ArrayElement ),
+ NAME_FUNC_OFFSET( 14852, glBindTextureEXT, _gloffset_BindTexture ),
+ NAME_FUNC_OFFSET( 14869, glDrawArraysEXT, _gloffset_DrawArrays ),
+ NAME_FUNC_OFFSET( 14885, glCopyTexImage1DEXT, _gloffset_CopyTexImage1D ),
+ NAME_FUNC_OFFSET( 14905, glCopyTexImage2DEXT, _gloffset_CopyTexImage2D ),
+ NAME_FUNC_OFFSET( 14925, glCopyTexSubImage1DEXT, _gloffset_CopyTexSubImage1D ),
+ NAME_FUNC_OFFSET( 14948, glCopyTexSubImage2DEXT, _gloffset_CopyTexSubImage2D ),
+ NAME_FUNC_OFFSET( 14971, glDeleteTexturesEXT, _gloffset_DeleteTextures ),
+ NAME_FUNC_OFFSET( 14991, glGetPointervEXT, _gloffset_GetPointerv ),
+ NAME_FUNC_OFFSET( 15008, glPrioritizeTexturesEXT, _gloffset_PrioritizeTextures ),
+ NAME_FUNC_OFFSET( 15032, glTexSubImage1DEXT, _gloffset_TexSubImage1D ),
+ NAME_FUNC_OFFSET( 15051, glTexSubImage2DEXT, _gloffset_TexSubImage2D ),
+ NAME_FUNC_OFFSET( 15070, glBlendColorEXT, _gloffset_BlendColor ),
+ NAME_FUNC_OFFSET( 15086, glBlendEquationEXT, _gloffset_BlendEquation ),
+ NAME_FUNC_OFFSET( 15105, glDrawRangeElementsEXT, _gloffset_DrawRangeElements ),
+ NAME_FUNC_OFFSET( 15128, glColorTableSGI, _gloffset_ColorTable ),
+ NAME_FUNC_OFFSET( 15144, glColorTableEXT, _gloffset_ColorTable ),
+ NAME_FUNC_OFFSET( 15160, glColorTableParameterfvSGI, _gloffset_ColorTableParameterfv ),
+ NAME_FUNC_OFFSET( 15187, glColorTableParameterivSGI, _gloffset_ColorTableParameteriv ),
+ NAME_FUNC_OFFSET( 15214, glCopyColorTableSGI, _gloffset_CopyColorTable ),
+ NAME_FUNC_OFFSET( 15234, glColorSubTableEXT, _gloffset_ColorSubTable ),
+ NAME_FUNC_OFFSET( 15253, glCopyColorSubTableEXT, _gloffset_CopyColorSubTable ),
+ NAME_FUNC_OFFSET( 15276, glConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D ),
+ NAME_FUNC_OFFSET( 15301, glConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D ),
+ NAME_FUNC_OFFSET( 15326, glConvolutionParameterfEXT, _gloffset_ConvolutionParameterf ),
+ NAME_FUNC_OFFSET( 15353, glConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv ),
+ NAME_FUNC_OFFSET( 15381, glConvolutionParameteriEXT, _gloffset_ConvolutionParameteri ),
+ NAME_FUNC_OFFSET( 15408, glConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv ),
+ NAME_FUNC_OFFSET( 15436, glCopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D ),
+ NAME_FUNC_OFFSET( 15465, glCopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D ),
+ NAME_FUNC_OFFSET( 15494, glSeparableFilter2DEXT, _gloffset_SeparableFilter2D ),
+ NAME_FUNC_OFFSET( 15517, glHistogramEXT, _gloffset_Histogram ),
+ NAME_FUNC_OFFSET( 15532, glMinmaxEXT, _gloffset_Minmax ),
+ NAME_FUNC_OFFSET( 15544, glResetHistogramEXT, _gloffset_ResetHistogram ),
+ NAME_FUNC_OFFSET( 15564, glResetMinmaxEXT, _gloffset_ResetMinmax ),
+ NAME_FUNC_OFFSET( 15581, glTexImage3DEXT, _gloffset_TexImage3D ),
+ NAME_FUNC_OFFSET( 15597, glTexSubImage3DEXT, _gloffset_TexSubImage3D ),
+ NAME_FUNC_OFFSET( 15616, glCopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D ),
+ NAME_FUNC_OFFSET( 15639, glActiveTexture, _gloffset_ActiveTextureARB ),
+ NAME_FUNC_OFFSET( 15655, glClientActiveTexture, _gloffset_ClientActiveTextureARB ),
+ NAME_FUNC_OFFSET( 15677, glMultiTexCoord1d, _gloffset_MultiTexCoord1dARB ),
+ NAME_FUNC_OFFSET( 15695, glMultiTexCoord1dv, _gloffset_MultiTexCoord1dvARB ),
+ NAME_FUNC_OFFSET( 15714, glMultiTexCoord1f, _gloffset_MultiTexCoord1fARB ),
+ NAME_FUNC_OFFSET( 15732, glMultiTexCoord1fv, _gloffset_MultiTexCoord1fvARB ),
+ NAME_FUNC_OFFSET( 15751, glMultiTexCoord1i, _gloffset_MultiTexCoord1iARB ),
+ NAME_FUNC_OFFSET( 15769, glMultiTexCoord1iv, _gloffset_MultiTexCoord1ivARB ),
+ NAME_FUNC_OFFSET( 15788, glMultiTexCoord1s, _gloffset_MultiTexCoord1sARB ),
+ NAME_FUNC_OFFSET( 15806, glMultiTexCoord1sv, _gloffset_MultiTexCoord1svARB ),
+ NAME_FUNC_OFFSET( 15825, glMultiTexCoord2d, _gloffset_MultiTexCoord2dARB ),
+ NAME_FUNC_OFFSET( 15843, glMultiTexCoord2dv, _gloffset_MultiTexCoord2dvARB ),
+ NAME_FUNC_OFFSET( 15862, glMultiTexCoord2f, _gloffset_MultiTexCoord2fARB ),
+ NAME_FUNC_OFFSET( 15880, glMultiTexCoord2fv, _gloffset_MultiTexCoord2fvARB ),
+ NAME_FUNC_OFFSET( 15899, glMultiTexCoord2i, _gloffset_MultiTexCoord2iARB ),
+ NAME_FUNC_OFFSET( 15917, glMultiTexCoord2iv, _gloffset_MultiTexCoord2ivARB ),
+ NAME_FUNC_OFFSET( 15936, glMultiTexCoord2s, _gloffset_MultiTexCoord2sARB ),
+ NAME_FUNC_OFFSET( 15954, glMultiTexCoord2sv, _gloffset_MultiTexCoord2svARB ),
+ NAME_FUNC_OFFSET( 15973, glMultiTexCoord3d, _gloffset_MultiTexCoord3dARB ),
+ NAME_FUNC_OFFSET( 15991, glMultiTexCoord3dv, _gloffset_MultiTexCoord3dvARB ),
+ NAME_FUNC_OFFSET( 16010, glMultiTexCoord3f, _gloffset_MultiTexCoord3fARB ),
+ NAME_FUNC_OFFSET( 16028, glMultiTexCoord3fv, _gloffset_MultiTexCoord3fvARB ),
+ NAME_FUNC_OFFSET( 16047, glMultiTexCoord3i, _gloffset_MultiTexCoord3iARB ),
+ NAME_FUNC_OFFSET( 16065, glMultiTexCoord3iv, _gloffset_MultiTexCoord3ivARB ),
+ NAME_FUNC_OFFSET( 16084, glMultiTexCoord3s, _gloffset_MultiTexCoord3sARB ),
+ NAME_FUNC_OFFSET( 16102, glMultiTexCoord3sv, _gloffset_MultiTexCoord3svARB ),
+ NAME_FUNC_OFFSET( 16121, glMultiTexCoord4d, _gloffset_MultiTexCoord4dARB ),
+ NAME_FUNC_OFFSET( 16139, glMultiTexCoord4dv, _gloffset_MultiTexCoord4dvARB ),
+ NAME_FUNC_OFFSET( 16158, glMultiTexCoord4f, _gloffset_MultiTexCoord4fARB ),
+ NAME_FUNC_OFFSET( 16176, glMultiTexCoord4fv, _gloffset_MultiTexCoord4fvARB ),
+ NAME_FUNC_OFFSET( 16195, glMultiTexCoord4i, _gloffset_MultiTexCoord4iARB ),
+ NAME_FUNC_OFFSET( 16213, glMultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB ),
+ NAME_FUNC_OFFSET( 16232, glMultiTexCoord4s, _gloffset_MultiTexCoord4sARB ),
+ NAME_FUNC_OFFSET( 16250, glMultiTexCoord4sv, _gloffset_MultiTexCoord4svARB ),
+ NAME_FUNC_OFFSET( 16269, glLoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB ),
+ NAME_FUNC_OFFSET( 16292, glLoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB ),
+ NAME_FUNC_OFFSET( 16315, glMultTransposeMatrixf, _gloffset_MultTransposeMatrixfARB ),
+ NAME_FUNC_OFFSET( 16338, glMultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB ),
+ NAME_FUNC_OFFSET( 16361, glSampleCoverage, _gloffset_SampleCoverageARB ),
+ NAME_FUNC_OFFSET( 16378, glDrawBuffersATI, _gloffset_DrawBuffersARB ),
+ NAME_FUNC_OFFSET( 16395, glSampleMaskEXT, _gloffset_SampleMaskSGIS ),
+ NAME_FUNC_OFFSET( 16411, glSamplePatternEXT, _gloffset_SamplePatternSGIS ),
+ NAME_FUNC_OFFSET( 16430, glPointParameterf, _gloffset_PointParameterfEXT ),
+ NAME_FUNC_OFFSET( 16448, glPointParameterfARB, _gloffset_PointParameterfEXT ),
+ NAME_FUNC_OFFSET( 16469, glPointParameterfSGIS, _gloffset_PointParameterfEXT ),
+ NAME_FUNC_OFFSET( 16491, glPointParameterfv, _gloffset_PointParameterfvEXT ),
+ NAME_FUNC_OFFSET( 16510, glPointParameterfvARB, _gloffset_PointParameterfvEXT ),
+ NAME_FUNC_OFFSET( 16532, glPointParameterfvSGIS, _gloffset_PointParameterfvEXT ),
+ NAME_FUNC_OFFSET( 16555, glWindowPos2d, _gloffset_WindowPos2dMESA ),
+ NAME_FUNC_OFFSET( 16569, glWindowPos2dARB, _gloffset_WindowPos2dMESA ),
+ NAME_FUNC_OFFSET( 16586, glWindowPos2dv, _gloffset_WindowPos2dvMESA ),
+ NAME_FUNC_OFFSET( 16601, glWindowPos2dvARB, _gloffset_WindowPos2dvMESA ),
+ NAME_FUNC_OFFSET( 16619, glWindowPos2f, _gloffset_WindowPos2fMESA ),
+ NAME_FUNC_OFFSET( 16633, glWindowPos2fARB, _gloffset_WindowPos2fMESA ),
+ NAME_FUNC_OFFSET( 16650, glWindowPos2fv, _gloffset_WindowPos2fvMESA ),
+ NAME_FUNC_OFFSET( 16665, glWindowPos2fvARB, _gloffset_WindowPos2fvMESA ),
+ NAME_FUNC_OFFSET( 16683, glWindowPos2i, _gloffset_WindowPos2iMESA ),
+ NAME_FUNC_OFFSET( 16697, glWindowPos2iARB, _gloffset_WindowPos2iMESA ),
+ NAME_FUNC_OFFSET( 16714, glWindowPos2iv, _gloffset_WindowPos2ivMESA ),
+ NAME_FUNC_OFFSET( 16729, glWindowPos2ivARB, _gloffset_WindowPos2ivMESA ),
+ NAME_FUNC_OFFSET( 16747, glWindowPos2s, _gloffset_WindowPos2sMESA ),
+ NAME_FUNC_OFFSET( 16761, glWindowPos2sARB, _gloffset_WindowPos2sMESA ),
+ NAME_FUNC_OFFSET( 16778, glWindowPos2sv, _gloffset_WindowPos2svMESA ),
+ NAME_FUNC_OFFSET( 16793, glWindowPos2svARB, _gloffset_WindowPos2svMESA ),
+ NAME_FUNC_OFFSET( 16811, glWindowPos3d, _gloffset_WindowPos3dMESA ),
+ NAME_FUNC_OFFSET( 16825, glWindowPos3dARB, _gloffset_WindowPos3dMESA ),
+ NAME_FUNC_OFFSET( 16842, glWindowPos3dv, _gloffset_WindowPos3dvMESA ),
+ NAME_FUNC_OFFSET( 16857, glWindowPos3dvARB, _gloffset_WindowPos3dvMESA ),
+ NAME_FUNC_OFFSET( 16875, glWindowPos3f, _gloffset_WindowPos3fMESA ),
+ NAME_FUNC_OFFSET( 16889, glWindowPos3fARB, _gloffset_WindowPos3fMESA ),
+ NAME_FUNC_OFFSET( 16906, glWindowPos3fv, _gloffset_WindowPos3fvMESA ),
+ NAME_FUNC_OFFSET( 16921, glWindowPos3fvARB, _gloffset_WindowPos3fvMESA ),
+ NAME_FUNC_OFFSET( 16939, glWindowPos3i, _gloffset_WindowPos3iMESA ),
+ NAME_FUNC_OFFSET( 16953, glWindowPos3iARB, _gloffset_WindowPos3iMESA ),
+ NAME_FUNC_OFFSET( 16970, glWindowPos3iv, _gloffset_WindowPos3ivMESA ),
+ NAME_FUNC_OFFSET( 16985, glWindowPos3ivARB, _gloffset_WindowPos3ivMESA ),
+ NAME_FUNC_OFFSET( 17003, glWindowPos3s, _gloffset_WindowPos3sMESA ),
+ NAME_FUNC_OFFSET( 17017, glWindowPos3sARB, _gloffset_WindowPos3sMESA ),
+ NAME_FUNC_OFFSET( 17034, glWindowPos3sv, _gloffset_WindowPos3svMESA ),
+ NAME_FUNC_OFFSET( 17049, glWindowPos3svARB, _gloffset_WindowPos3svMESA ),
+ NAME_FUNC_OFFSET( 17067, glBlendFuncSeparate, _gloffset_BlendFuncSeparateEXT ),
+ NAME_FUNC_OFFSET( 17087, glBlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT ),
+ NAME_FUNC_OFFSET( 17111, glFogCoordf, _gloffset_FogCoordfEXT ),
+ NAME_FUNC_OFFSET( 17123, glFogCoordfv, _gloffset_FogCoordfvEXT ),
+ NAME_FUNC_OFFSET( 17136, glFogCoordd, _gloffset_FogCoorddEXT ),
+ NAME_FUNC_OFFSET( 17148, glFogCoorddv, _gloffset_FogCoorddvEXT ),
+ NAME_FUNC_OFFSET( 17161, glFogCoordPointer, _gloffset_FogCoordPointerEXT ),
+ NAME_FUNC_OFFSET( 17179, glCompressedTexImage3D, _gloffset_CompressedTexImage3DARB ),
+ NAME_FUNC_OFFSET( 17202, glCompressedTexImage2D, _gloffset_CompressedTexImage2DARB ),
+ NAME_FUNC_OFFSET( 17225, glCompressedTexImage1D, _gloffset_CompressedTexImage1DARB ),
+ NAME_FUNC_OFFSET( 17248, glCompressedTexSubImage3D, _gloffset_CompressedTexSubImage3DARB ),
+ NAME_FUNC_OFFSET( 17274, glCompressedTexSubImage2D, _gloffset_CompressedTexSubImage2DARB ),
+ NAME_FUNC_OFFSET( 17300, glCompressedTexSubImage1D, _gloffset_CompressedTexSubImage1DARB ),
+ NAME_FUNC_OFFSET( 17326, glGetCompressedTexImage, _gloffset_GetCompressedTexImageARB ),
+ NAME_FUNC_OFFSET( 17350, glSecondaryColor3b, _gloffset_SecondaryColor3bEXT ),
+ NAME_FUNC_OFFSET( 17369, glSecondaryColor3bv, _gloffset_SecondaryColor3bvEXT ),
+ NAME_FUNC_OFFSET( 17389, glSecondaryColor3d, _gloffset_SecondaryColor3dEXT ),
+ NAME_FUNC_OFFSET( 17408, glSecondaryColor3dv, _gloffset_SecondaryColor3dvEXT ),
+ NAME_FUNC_OFFSET( 17428, glSecondaryColor3f, _gloffset_SecondaryColor3fEXT ),
+ NAME_FUNC_OFFSET( 17447, glSecondaryColor3fv, _gloffset_SecondaryColor3fvEXT ),
+ NAME_FUNC_OFFSET( 17467, glSecondaryColor3i, _gloffset_SecondaryColor3iEXT ),
+ NAME_FUNC_OFFSET( 17486, glSecondaryColor3iv, _gloffset_SecondaryColor3ivEXT ),
+ NAME_FUNC_OFFSET( 17506, glSecondaryColor3s, _gloffset_SecondaryColor3sEXT ),
+ NAME_FUNC_OFFSET( 17525, glSecondaryColor3sv, _gloffset_SecondaryColor3svEXT ),
+ NAME_FUNC_OFFSET( 17545, glSecondaryColor3ub, _gloffset_SecondaryColor3ubEXT ),
+ NAME_FUNC_OFFSET( 17565, glSecondaryColor3ubv, _gloffset_SecondaryColor3ubvEXT ),
+ NAME_FUNC_OFFSET( 17586, glSecondaryColor3ui, _gloffset_SecondaryColor3uiEXT ),
+ NAME_FUNC_OFFSET( 17606, glSecondaryColor3uiv, _gloffset_SecondaryColor3uivEXT ),
+ NAME_FUNC_OFFSET( 17627, glSecondaryColor3us, _gloffset_SecondaryColor3usEXT ),
+ NAME_FUNC_OFFSET( 17647, glSecondaryColor3usv, _gloffset_SecondaryColor3usvEXT ),
+ NAME_FUNC_OFFSET( 17668, glSecondaryColorPointer, _gloffset_SecondaryColorPointerEXT ),
+ NAME_FUNC_OFFSET( 17692, glBindProgramARB, _gloffset_BindProgramNV ),
+ NAME_FUNC_OFFSET( 17709, glDeleteProgramsARB, _gloffset_DeleteProgramsNV ),
+ NAME_FUNC_OFFSET( 17729, glGenProgramsARB, _gloffset_GenProgramsNV ),
+ NAME_FUNC_OFFSET( 17746, glGetVertexAttribPointervARB, _gloffset_GetVertexAttribPointervNV ),
+ NAME_FUNC_OFFSET( 17775, glIsProgramARB, _gloffset_IsProgramNV ),
+ NAME_FUNC_OFFSET( 17790, glPointParameteri, _gloffset_PointParameteriNV ),
+ NAME_FUNC_OFFSET( 17808, glPointParameteriv, _gloffset_PointParameterivNV ),
+ NAME_FUNC_OFFSET( 17827, glMultiDrawArrays, _gloffset_MultiDrawArraysEXT ),
+ NAME_FUNC_OFFSET( 17845, glMultiDrawElements, _gloffset_MultiDrawElementsEXT ),
+ NAME_FUNC_OFFSET( 17865, glBindBuffer, _gloffset_BindBufferARB ),
+ NAME_FUNC_OFFSET( 17878, glBufferData, _gloffset_BufferDataARB ),
+ NAME_FUNC_OFFSET( 17891, glBufferSubData, _gloffset_BufferSubDataARB ),
+ NAME_FUNC_OFFSET( 17907, glDeleteBuffers, _gloffset_DeleteBuffersARB ),
+ NAME_FUNC_OFFSET( 17923, glGenBuffers, _gloffset_GenBuffersARB ),
+ NAME_FUNC_OFFSET( 17936, glGetBufferParameteriv, _gloffset_GetBufferParameterivARB ),
+ NAME_FUNC_OFFSET( 17959, glGetBufferPointerv, _gloffset_GetBufferPointervARB ),
+ NAME_FUNC_OFFSET( 17979, glGetBufferSubData, _gloffset_GetBufferSubDataARB ),
+ NAME_FUNC_OFFSET( 17998, glIsBuffer, _gloffset_IsBufferARB ),
+ NAME_FUNC_OFFSET( 18009, glMapBuffer, _gloffset_MapBufferARB ),
+ NAME_FUNC_OFFSET( 18021, glUnmapBuffer, _gloffset_UnmapBufferARB ),
+ NAME_FUNC_OFFSET( 18035, glGenQueries, _gloffset_GenQueriesARB ),
+ NAME_FUNC_OFFSET( 18048, glDeleteQueries, _gloffset_DeleteQueriesARB ),
+ NAME_FUNC_OFFSET( 18064, glIsQuery, _gloffset_IsQueryARB ),
+ NAME_FUNC_OFFSET( 18074, glBeginQuery, _gloffset_BeginQueryARB ),
+ NAME_FUNC_OFFSET( 18087, glEndQuery, _gloffset_EndQueryARB ),
+ NAME_FUNC_OFFSET( 18098, glGetQueryiv, _gloffset_GetQueryivARB ),
+ NAME_FUNC_OFFSET( 18111, glGetQueryObjectiv, _gloffset_GetQueryObjectivARB ),
+ NAME_FUNC_OFFSET( 18130, glGetQueryObjectuiv, _gloffset_GetQueryObjectuivARB ),
+ NAME_FUNC_OFFSET( 18150, glBlendEquationSeparateATI, _gloffset_BlendEquationSeparateEXT ),
NAME_FUNC_OFFSET( -1, NULL, 0 )
};
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index 9c65ae5b9a1..dda659bbc3f 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1078,38 +1078,38 @@ static void _ae_update_state( GLcontext *ctx )
GLuint i;
/* conventional vertex arrays */
- if (ctx->Array.Index.Enabled) {
- aa->array = &ctx->Array.Index;
+ if (ctx->Array.ArrayObj->Index.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->Index;
aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
- if (ctx->Array.EdgeFlag.Enabled) {
- aa->array = &ctx->Array.EdgeFlag;
+ if (ctx->Array.ArrayObj->EdgeFlag.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->EdgeFlag;
aa->offset = _gloffset_EdgeFlagv;
aa++;
}
- if (ctx->Array.Normal.Enabled) {
- aa->array = &ctx->Array.Normal;
+ if (ctx->Array.ArrayObj->Normal.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->Normal;
aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
- if (ctx->Array.Color.Enabled) {
- aa->array = &ctx->Array.Color;
+ if (ctx->Array.ArrayObj->Color.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->Color;
aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)];
aa++;
}
- if (ctx->Array.SecondaryColor.Enabled) {
- aa->array = &ctx->Array.SecondaryColor;
+ if (ctx->Array.ArrayObj->SecondaryColor.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->SecondaryColor;
aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
- if (ctx->Array.FogCoord.Enabled) {
- aa->array = &ctx->Array.FogCoord;
+ if (ctx->Array.ArrayObj->FogCoord.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->FogCoord;
aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- struct gl_client_array *attribArray = &ctx->Array.TexCoord[i];
+ struct gl_client_array *attribArray = &ctx->Array.ArrayObj->TexCoord[i];
if (attribArray->Enabled) {
/* NOTE: we use generic glVertexAttribNV functions here.
* If we ever remove GL_NV_vertex_program this will have to change.
@@ -1126,7 +1126,7 @@ static void _ae_update_state( GLcontext *ctx )
/* generic vertex attribute arrays */
for (i = 1; i < VERT_ATTRIB_MAX; i++) { /* skip zero! */
- struct gl_client_array *attribArray = &ctx->Array.VertexAttrib[i];
+ struct gl_client_array *attribArray = &ctx->Array.ArrayObj->VertexAttrib[i];
if (attribArray->Enabled) {
at->array = attribArray;
/* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
@@ -1151,17 +1151,17 @@ static void _ae_update_state( GLcontext *ctx )
}
/* finally, vertex position */
- if (ctx->Array.VertexAttrib[0].Enabled) {
+ if (ctx->Array.ArrayObj->VertexAttrib[0].Enabled) {
/* Use glVertex(v) instead of glVertexAttrib(0, v) to be sure it's
* issued as the last (provoking) attribute).
*/
- aa->array = &ctx->Array.VertexAttrib[0];
+ aa->array = &ctx->Array.ArrayObj->VertexAttrib[0];
assert(aa->array->Size >= 2); /* XXX fix someday? */
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
aa++;
}
- else if (ctx->Array.Vertex.Enabled) {
- aa->array = &ctx->Array.Vertex;
+ else if (ctx->Array.ArrayObj->Vertex.Enabled) {
+ aa->array = &ctx->Array.ArrayObj->Vertex;
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
aa++;
}
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index d1c8f42e747..3d20ba7d144 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -60,8 +60,8 @@ _mesa_validate_DrawElements(GLcontext *ctx,
_mesa_update_state(ctx);
/* Always need vertex positions */
- if (!ctx->Array.Vertex.Enabled
- && !(ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled))
+ if (!ctx->Array.ArrayObj->Vertex.Enabled
+ && !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
return GL_FALSE;
/* Vertex buffer object tests */
@@ -166,8 +166,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
_mesa_update_state(ctx);
/* Always need vertex positions */
- if (!ctx->Array.Vertex.Enabled
- && !(ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled))
+ if (!ctx->Array.ArrayObj->Vertex.Enabled
+ && !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
return GL_FALSE;
if (ctx->Const.CheckArrayBounds) {
@@ -226,7 +226,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
_mesa_update_state(ctx);
/* Always need vertex positions */
- if (!ctx->Array.Vertex.Enabled && !ctx->Array.VertexAttrib[0].Enabled)
+ if (!ctx->Array.ArrayObj->Vertex.Enabled && !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
return GL_FALSE;
if (ctx->Const.CheckArrayBounds) {
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
new file mode 100644
index 00000000000..86f2e163194
--- /dev/null
+++ b/src/mesa/main/arrayobj.c
@@ -0,0 +1,426 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * (C) Copyright IBM Corporation 2006
+ *
+ * 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 OR IBM 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 arrayobj.c
+ * Functions for the GL_APPLE_vertex_array_object extension.
+ *
+ * \todo
+ * The code in this file borrows a lot from bufferobj.c. There's a certain
+ * amount of cruft left over from that origin that may be unnecessary.
+ *
+ * \author Ian Romanick <idr@us.ibm.com>
+ * \author Brian Paul
+ */
+
+
+#include "glheader.h"
+#include "hash.h"
+#include "imports.h"
+#include "context.h"
+#if FEATURE_ARB_vertex_buffer_object
+#include "bufferobj.h"
+#endif
+#include "arrayobj.h"
+#include "dispatch.h"
+
+
+/**
+ * Look up the array object for the given ID.
+ *
+ * \returns
+ * Either a pointer to the array object with the specified ID or \c NULL for
+ * a non-existent ID. The spec defines ID 0 as being technically
+ * non-existent.
+ */
+
+static INLINE struct gl_array_object *
+lookup_arrayobj(GLcontext *ctx, GLuint id)
+{
+ return (id == 0)
+ ? NULL
+ : (struct gl_array_object *) _mesa_HashLookup(ctx->Shared->ArrayObjects,
+ id);
+}
+
+
+/**
+ * Allocate and initialize a new array object.
+ *
+ * This function is intended to be called via
+ * \c dd_function_table::NewArrayObject.
+ */
+struct gl_array_object *
+_mesa_new_array_object( GLcontext *ctx, GLuint name )
+{
+ struct gl_array_object *obj;
+
+ (void) ctx;
+
+ obj = MALLOC_STRUCT(gl_array_object);
+ _mesa_initialize_array_object(ctx, obj, name);
+ return obj;
+}
+
+
+/**
+ * Delete an array object.
+ *
+ * This function is intended to be called via
+ * \c dd_function_table::DeleteArrayObject.
+ */
+void
+_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj )
+{
+ (void) ctx;
+
+ _mesa_free(obj);
+}
+
+
+void
+_mesa_initialize_array_object( GLcontext *ctx,
+ struct gl_array_object *obj,
+ GLuint name )
+{
+ GLuint i;
+
+
+ obj->Name = name;
+
+ /* Vertex arrays */
+ obj->Vertex.Size = 4;
+ obj->Vertex.Type = GL_FLOAT;
+ obj->Vertex.Stride = 0;
+ obj->Vertex.StrideB = 0;
+ obj->Vertex.Ptr = NULL;
+ obj->Vertex.Enabled = GL_FALSE;
+ obj->Vertex.Flags = CA_CLIENT_DATA;
+ obj->Normal.Type = GL_FLOAT;
+ obj->Normal.Stride = 0;
+ obj->Normal.StrideB = 0;
+ obj->Normal.Ptr = NULL;
+ obj->Normal.Enabled = GL_FALSE;
+ obj->Normal.Flags = CA_CLIENT_DATA;
+ obj->Color.Size = 4;
+ obj->Color.Type = GL_FLOAT;
+ obj->Color.Stride = 0;
+ obj->Color.StrideB = 0;
+ obj->Color.Ptr = NULL;
+ obj->Color.Enabled = GL_FALSE;
+ obj->Color.Flags = CA_CLIENT_DATA;
+ obj->SecondaryColor.Size = 4;
+ obj->SecondaryColor.Type = GL_FLOAT;
+ obj->SecondaryColor.Stride = 0;
+ obj->SecondaryColor.StrideB = 0;
+ obj->SecondaryColor.Ptr = NULL;
+ obj->SecondaryColor.Enabled = GL_FALSE;
+ obj->SecondaryColor.Flags = CA_CLIENT_DATA;
+ obj->FogCoord.Size = 1;
+ obj->FogCoord.Type = GL_FLOAT;
+ obj->FogCoord.Stride = 0;
+ obj->FogCoord.StrideB = 0;
+ obj->FogCoord.Ptr = NULL;
+ obj->FogCoord.Enabled = GL_FALSE;
+ obj->FogCoord.Flags = CA_CLIENT_DATA;
+ obj->Index.Type = GL_FLOAT;
+ obj->Index.Stride = 0;
+ obj->Index.StrideB = 0;
+ obj->Index.Ptr = NULL;
+ obj->Index.Enabled = GL_FALSE;
+ obj->Index.Flags = CA_CLIENT_DATA;
+ for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ obj->TexCoord[i].Size = 4;
+ obj->TexCoord[i].Type = GL_FLOAT;
+ obj->TexCoord[i].Stride = 0;
+ obj->TexCoord[i].StrideB = 0;
+ obj->TexCoord[i].Ptr = NULL;
+ obj->TexCoord[i].Enabled = GL_FALSE;
+ obj->TexCoord[i].Flags = CA_CLIENT_DATA;
+ }
+ obj->EdgeFlag.Stride = 0;
+ obj->EdgeFlag.StrideB = 0;
+ obj->EdgeFlag.Ptr = NULL;
+ obj->EdgeFlag.Enabled = GL_FALSE;
+ obj->EdgeFlag.Flags = CA_CLIENT_DATA;
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ obj->VertexAttrib[i].Size = 4;
+ obj->VertexAttrib[i].Type = GL_FLOAT;
+ obj->VertexAttrib[i].Stride = 0;
+ obj->VertexAttrib[i].StrideB = 0;
+ obj->VertexAttrib[i].Ptr = NULL;
+ obj->VertexAttrib[i].Enabled = GL_FALSE;
+ obj->VertexAttrib[i].Normalized = GL_FALSE;
+ obj->VertexAttrib[i].Flags = CA_CLIENT_DATA;
+ }
+
+
+#if FEATURE_ARB_vertex_buffer_object
+ /* Vertex array buffers */
+ obj->Vertex.BufferObj = ctx->Array.NullBufferObj;
+ obj->Normal.BufferObj = ctx->Array.NullBufferObj;
+ obj->Color.BufferObj = ctx->Array.NullBufferObj;
+ obj->SecondaryColor.BufferObj = ctx->Array.NullBufferObj;
+ obj->FogCoord.BufferObj = ctx->Array.NullBufferObj;
+ obj->Index.BufferObj = ctx->Array.NullBufferObj;
+ for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ obj->TexCoord[i].BufferObj = ctx->Array.NullBufferObj;
+ }
+ obj->EdgeFlag.BufferObj = ctx->Array.NullBufferObj;
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ obj->VertexAttrib[i].BufferObj = ctx->Array.NullBufferObj;
+ }
+#endif
+}
+
+
+/**
+ * Add the given array object to the array object pool.
+ */
+void
+_mesa_save_array_object( GLcontext *ctx, struct gl_array_object *obj )
+{
+ if (obj->Name > 0) {
+ /* insert into hash table */
+ _mesa_HashInsert(ctx->Shared->ArrayObjects, obj->Name, obj);
+ }
+}
+
+
+/**
+ * Remove the given array object from the array object pool.
+ * Do not deallocate the array object though.
+ */
+void
+_mesa_remove_array_object( GLcontext *ctx, struct gl_array_object *obj )
+{
+ if (obj->Name > 0) {
+ /* remove from hash table */
+ _mesa_HashRemove(ctx->Shared->ArrayObjects, obj->Name);
+ }
+}
+
+
+/**********************************************************************/
+/* API Functions */
+/**********************************************************************/
+
+/**
+ * Bind a new array.
+ *
+ * \todo
+ * The binding could be done more efficiently by comparing the non-NULL
+ * pointers in the old and new objects. The only arrays that are "dirty" are
+ * the ones that are non-NULL in either object.
+ */
+void GLAPIENTRY
+_mesa_BindVertexArrayAPPLE( GLuint id )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_array_object * const oldObj = ctx->Array.ArrayObj;
+ struct gl_array_object *newObj = NULL;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+
+ ASSERT(oldObj != NULL);
+
+ if ( oldObj->Name == id )
+ return; /* rebinding the same array object- no change */
+
+ /*
+ * Get pointer to new array object (newBufObj)
+ */
+ if (id == 0) {
+ /* The spec says there is no array object named 0, but we use
+ * one internally because it simplifies things.
+ */
+ newObj = ctx->Array.DefaultArrayObj;
+ }
+ else {
+ /* non-default array object */
+ newObj = lookup_arrayobj(ctx, id);
+ if (!newObj) {
+ /* If this is a new array object id, allocate an array object now.
+ */
+
+ newObj = (*ctx->Driver.NewArrayObject)(ctx, id);
+ if (!newObj) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE");
+ return;
+ }
+ _mesa_save_array_object(ctx, newObj);
+ }
+ }
+
+
+ ctx->NewState |= _NEW_ARRAY;
+ ctx->Array.NewState |= _NEW_ARRAY_ALL;
+ ctx->Array.ArrayObj = newObj;
+
+
+ /* Pass BindVertexArray call to device driver */
+ if (ctx->Driver.BindArrayObject && newObj)
+ (*ctx->Driver.BindArrayObject)( ctx, newObj );
+}
+
+
+/**
+ * Delete a set of array objects.
+ *
+ * \param n Number of array objects to delete.
+ * \param ids Array of \c n array object IDs.
+ */
+void GLAPIENTRY
+_mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLsizei i;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteVertexArrayAPPLE(n)");
+ return;
+ }
+
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+
+ for (i = 0; i < n; i++) {
+ struct gl_array_object *obj = lookup_arrayobj(ctx, ids[i]);
+
+ if ( obj != NULL ) {
+ ASSERT( obj->Name == ids[i] );
+
+
+ /* If the array object is currently bound, the spec says "the binding
+ * for that object reverts to zero and the default vertex array
+ * becomes current."
+ */
+ if ( obj == ctx->Array.ArrayObj ) {
+ CALL_BindVertexArrayAPPLE( ctx->Exec, (0) );
+ }
+
+#if FEATURE_ARB_vertex_buffer_object
+ /* Unbind any buffer objects that might be bound to arrays in
+ * this array object.
+ */
+ _mesa_unbind_buffer_object( ctx, obj->Vertex.BufferObj );
+ _mesa_unbind_buffer_object( ctx, obj->Normal.BufferObj );
+ _mesa_unbind_buffer_object( ctx, obj->Color.BufferObj );
+ _mesa_unbind_buffer_object( ctx, obj->SecondaryColor.BufferObj );
+ _mesa_unbind_buffer_object( ctx, obj->FogCoord.BufferObj );
+ _mesa_unbind_buffer_object( ctx, obj->Index.BufferObj );
+ for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ _mesa_unbind_buffer_object( ctx, obj->TexCoord[i].BufferObj );
+ }
+ _mesa_unbind_buffer_object( ctx, obj->EdgeFlag.BufferObj );
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ _mesa_unbind_buffer_object( ctx, obj->VertexAttrib[i].BufferObj );
+ }
+#endif
+
+ /* The ID is immediately freed for re-use */
+ _mesa_remove_array_object(ctx, obj);
+ ctx->Driver.DeleteArrayObject(ctx, obj);
+ }
+ }
+
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+}
+
+
+/**
+ * Generate a set of unique array object IDs and store them in \c buffer.
+ *
+ * \param n Number of IDs to generate.
+ * \param buffer Array of \c n locations to store the IDs.
+ */
+void GLAPIENTRY
+_mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint first;
+ GLint i;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenVertexArraysAPPLE");
+ return;
+ }
+
+ if (!buffer) {
+ return;
+ }
+
+ /*
+ * This must be atomic (generation and allocation of array object IDs)
+ */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+
+ first = _mesa_HashFindFreeKeyBlock(ctx->Shared->ArrayObjects, n);
+
+ /* Allocate new, empty array objects and return identifiers */
+ for (i = 0; i < n; i++) {
+ struct gl_array_object *obj;
+ GLuint name = first + i;
+
+ obj = (*ctx->Driver.NewArrayObject)( ctx, name );
+ if (!obj) {
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenVertexArraysAPPLE");
+ return;
+ }
+ _mesa_save_array_object(ctx, obj);
+ buffer[i] = first + i;
+ }
+
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+}
+
+
+/**
+ * Determine if ID is the name of an array object.
+ *
+ * \param id ID of the potential array object.
+ * \return \c GL_TRUE if \c id is the name of a array object,
+ * \c GL_FALSE otherwise.
+ */
+GLboolean GLAPIENTRY
+_mesa_IsVertexArrayAPPLE( GLuint id )
+{
+ struct gl_array_object * obj;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (id == 0)
+ return GL_FALSE;
+
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ obj = lookup_arrayobj(ctx, id);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+
+ return (obj != NULL) ? GL_TRUE : GL_FALSE;
+}
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
new file mode 100644
index 00000000000..c7d66ec1669
--- /dev/null
+++ b/src/mesa/main/arrayobj.h
@@ -0,0 +1,70 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * (C) Copyright IBM Corporation 2006
+ *
+ * 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 OR IBM 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 ARRAYOBJ_H
+#define ARRAYOBJ_H
+
+#include "context.h"
+
+/**
+ * \file arrayobj.h
+ * Functions for the GL_APPLE_vertex_array_object extension.
+ *
+ * \author Ian Romanick <idr@us.ibm.com>
+ * \author Brian Paul
+ */
+
+/*
+ * Internal functions
+ */
+
+struct gl_array_object * _mesa_new_array_object( GLcontext *ctx,
+ GLuint name );
+
+void _mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj );
+
+void _mesa_initialize_array_object( GLcontext *ctx,
+ struct gl_array_object *obj, GLuint name );
+
+void _mesa_save_array_object( GLcontext *ctx, struct gl_array_object *obj );
+
+void _mesa_remove_array_object( GLcontext *ctx, struct gl_array_object *obj );
+
+
+
+/*
+ * API functions
+ */
+
+void GLAPIENTRY _mesa_BindVertexArrayAPPLE( GLuint id );
+
+void GLAPIENTRY _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids);
+
+void GLAPIENTRY _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer);
+
+GLboolean GLAPIENTRY _mesa_IsVertexArrayAPPLE( GLuint id );
+
+#endif /* ARRAYOBJ_H */
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index eaf20a5b73e..da6f1f902d2 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1210,17 +1210,17 @@ static void
adjust_buffer_object_ref_counts(struct gl_array_attrib *array, GLint step)
{
GLuint i;
- array->Vertex.BufferObj->RefCount += step;
- array->Normal.BufferObj->RefCount += step;
- array->Color.BufferObj->RefCount += step;
- array->SecondaryColor.BufferObj->RefCount += step;
- array->FogCoord.BufferObj->RefCount += step;
- array->Index.BufferObj->RefCount += step;
- array->EdgeFlag.BufferObj->RefCount += step;
+ array->ArrayObj->Vertex.BufferObj->RefCount += step;
+ array->ArrayObj->Normal.BufferObj->RefCount += step;
+ array->ArrayObj->Color.BufferObj->RefCount += step;
+ array->ArrayObj->SecondaryColor.BufferObj->RefCount += step;
+ array->ArrayObj->FogCoord.BufferObj->RefCount += step;
+ array->ArrayObj->Index.BufferObj->RefCount += step;
+ array->ArrayObj->EdgeFlag.BufferObj->RefCount += step;
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++)
- array->TexCoord[i].BufferObj->RefCount += step;
+ array->ArrayObj->TexCoord[i].BufferObj->RefCount += step;
for (i = 0; i < VERT_ATTRIB_MAX; i++)
- array->VertexAttrib[i].BufferObj->RefCount += step;
+ array->ArrayObj->VertexAttrib[i].BufferObj->RefCount += step;
array->ArrayBufferObj->RefCount += step;
array->ElementArrayBufferObj->RefCount += step;
@@ -1272,8 +1272,16 @@ _mesa_PushClientAttrib(GLbitfield mask)
}
if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
struct gl_array_attrib *attr;
+ struct gl_array_object *obj;
+
attr = MALLOC_STRUCT( gl_array_attrib );
+ obj = MALLOC_STRUCT( gl_array_object );
+
MEMCPY( attr, &ctx->Array, sizeof(struct gl_array_attrib) );
+ MEMCPY( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) );
+
+ attr->ArrayObj = obj;
+
newnode = new_attrib_node( GL_CLIENT_VERTEX_ARRAY_BIT );
newnode->data = attr;
newnode->next = head;
@@ -1331,13 +1339,31 @@ _mesa_PopClientAttrib(void)
sizeof(struct gl_pixelstore_attrib) );
ctx->NewState |= _NEW_PACKUNPACK;
break;
- case GL_CLIENT_VERTEX_ARRAY_BIT:
+ case GL_CLIENT_VERTEX_ARRAY_BIT: {
+ struct gl_array_attrib * data =
+ (struct gl_array_attrib *) attr->data;
+
adjust_buffer_object_ref_counts(&ctx->Array, -1);
- MEMCPY( &ctx->Array, attr->data,
- sizeof(struct gl_array_attrib) );
- /* decrement reference counts on buffer objects */
+
+ ctx->Array.ActiveTexture = data->ActiveTexture;
+ ctx->Array.LockFirst = data->LockFirst;
+ ctx->Array.LockCount = data->LockCount;
+
+ _mesa_BindVertexArrayAPPLE( data->ArrayObj->Name );
+
+ MEMCPY( ctx->Array.ArrayObj, data->ArrayObj,
+ sizeof( struct gl_array_object ) );
+
+ FREE( data->ArrayObj );
+
+ /* FIXME: Should some bits in ctx->Array->NewState also be set
+ * FIXME: here? It seems like it should be set to inclusive-or
+ * FIXME: of the old ArrayObj->_Enabled and the new _Enabled.
+ */
+
ctx->NewState |= _NEW_ARRAY;
break;
+ }
default:
_mesa_problem( ctx, "Bad attrib flag in PopClientAttrib");
break;
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index d6cc78e18d5..6deb823f348 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -169,6 +169,22 @@ _mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
}
+void
+_mesa_unbind_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
+{
+ if (bufObj != ctx->Array.NullBufferObj) {
+ bufObj->RefCount--;
+ if (bufObj->RefCount <= 0) {
+ ASSERT(ctx->Array.ArrayBufferObj != bufObj);
+ ASSERT(ctx->Array.ElementArrayBufferObj != bufObj);
+ ASSERT(ctx->Array.ArrayObj->Vertex.BufferObj != bufObj);
+ ASSERT(ctx->Driver.DeleteBuffer);
+ ctx->Driver.DeleteBuffer(ctx, bufObj);
+ }
+ }
+}
+
+
/**
* Initialize a buffer object to default values.
*/
@@ -389,21 +405,6 @@ _mesa_init_buffer_objects( GLcontext *ctx )
ctx->Array.ArrayBufferObj = ctx->Array.NullBufferObj;
ctx->Array.ElementArrayBufferObj = ctx->Array.NullBufferObj;
-
- /* Vertex array buffers */
- ctx->Array.Vertex.BufferObj = ctx->Array.NullBufferObj;
- ctx->Array.Normal.BufferObj = ctx->Array.NullBufferObj;
- ctx->Array.Color.BufferObj = ctx->Array.NullBufferObj;
- ctx->Array.SecondaryColor.BufferObj = ctx->Array.NullBufferObj;
- ctx->Array.FogCoord.BufferObj = ctx->Array.NullBufferObj;
- ctx->Array.Index.BufferObj = ctx->Array.NullBufferObj;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
- ctx->Array.TexCoord[i].BufferObj = ctx->Array.NullBufferObj;
- }
- ctx->Array.EdgeFlag.BufferObj = ctx->Array.NullBufferObj;
- for (i = 0; i < VERT_ATTRIB_MAX; i++) {
- ctx->Array.VertexAttrib[i].BufferObj = ctx->Array.NullBufferObj;
- }
}
@@ -585,52 +586,52 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
ASSERT(bufObj->Name == ids[i]);
- if (ctx->Array.Vertex.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->Vertex.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.Vertex.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->Vertex.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
- if (ctx->Array.Normal.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->Normal.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.Normal.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->Normal.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
- if (ctx->Array.Color.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->Color.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.Color.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->Color.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
- if (ctx->Array.SecondaryColor.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->SecondaryColor.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.SecondaryColor.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->SecondaryColor.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
- if (ctx->Array.FogCoord.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->FogCoord.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.FogCoord.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->FogCoord.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
- if (ctx->Array.Index.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->Index.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.Index.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->Index.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
- if (ctx->Array.EdgeFlag.BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->EdgeFlag.BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.EdgeFlag.BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->EdgeFlag.BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
for (j = 0; j < MAX_TEXTURE_UNITS; j++) {
- if (ctx->Array.TexCoord[j].BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->TexCoord[j].BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.TexCoord[j].BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->TexCoord[j].BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
}
for (j = 0; j < VERT_ATTRIB_MAX; j++) {
- if (ctx->Array.VertexAttrib[j].BufferObj == bufObj) {
+ if (ctx->Array.ArrayObj->VertexAttrib[j].BufferObj == bufObj) {
bufObj->RefCount--;
- ctx->Array.VertexAttrib[j].BufferObj = ctx->Array.NullBufferObj;
+ ctx->Array.ArrayObj->VertexAttrib[j].BufferObj = ctx->Array.NullBufferObj;
ctx->Array.NullBufferObj->RefCount++;
}
}
@@ -649,16 +650,9 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
_mesa_BindBufferARB( GL_PIXEL_UNPACK_BUFFER_EXT, 0 );
}
- /* The ID is immediately freed for re-use */
- _mesa_remove_buffer_object(ctx, bufObj);
- bufObj->RefCount--;
- if (bufObj->RefCount <= 0) {
- ASSERT(ctx->Array.ArrayBufferObj != bufObj);
- ASSERT(ctx->Array.ElementArrayBufferObj != bufObj);
- ASSERT(ctx->Array.Vertex.BufferObj != bufObj);
- ASSERT(ctx->Driver.DeleteBuffer);
- ctx->Driver.DeleteBuffer(ctx, bufObj);
- }
+ /* The ID is immediately freed for re-use */
+ _mesa_remove_buffer_object(ctx, bufObj);
+ _mesa_unbind_buffer_object(ctx, bufObj);
}
}
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index bc1005332ca..05e27c984ea 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -83,6 +83,8 @@ _mesa_validate_pbo_access(GLuint dimensions,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type, const GLvoid *ptr);
+extern void
+_mesa_unbind_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj );
/*
* API functions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 2379c6d7668..08020dbac88 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -698,6 +698,7 @@ alloc_shared_state( GLcontext *ctx )
#endif
ss->BufferObjects = _mesa_NewHashTable();
+ ss->ArrayObjects = _mesa_NewHashTable();
ss->GL2Objects = _mesa_NewHashTable ();
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 4d9cea1e59e..6675d56ed82 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -833,6 +833,16 @@ struct dd_function_table {
/**
+ * \name Vertex Array objects
+ */
+ /*@{*/
+ struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id);
+ void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
+ void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
+ /*@}*/
+
+
+ /**
* \name Support for multiple T&L engines
*/
/*@{*/
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index cbf00f735ed..883fa730163 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -43,6 +43,7 @@
#if FEATURE_ARB_vertex_buffer_object
#include "bufferobj.h"
#endif
+#include "arrayobj.h"
#include "clip.h"
#include "colormac.h"
#include "colortab.h"
@@ -8031,6 +8032,12 @@ _mesa_init_dlist_table(struct _glapi_table *table)
/* 268. GL_EXT_stencil_two_side */
SET_ActiveStencilFaceEXT(table, save_ActiveStencilFaceEXT);
+ /* 273. GL_APPLE_vertex_array_object */
+ SET_BindVertexArrayAPPLE(table, _mesa_BindVertexArrayAPPLE);
+ SET_DeleteVertexArraysAPPLE(table, _mesa_DeleteVertexArraysAPPLE);
+ SET_GenVertexArraysAPPLE(table, _mesa_GenVertexArraysAPPLE);
+ SET_IsVertexArrayAPPLE(table, _mesa_IsVertexArrayAPPLE);
+
/* ???. GL_EXT_depth_bounds_test */
SET_DepthBoundsEXT(table, save_DepthBoundsEXT);
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index af54fea30bb..1d439e675f4 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -57,35 +57,35 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
switch (cap) {
case GL_VERTEX_ARRAY:
- var = &ctx->Array.Vertex.Enabled;
+ var = &ctx->Array.ArrayObj->Vertex.Enabled;
flag = _NEW_ARRAY_VERTEX;
break;
case GL_NORMAL_ARRAY:
- var = &ctx->Array.Normal.Enabled;
+ var = &ctx->Array.ArrayObj->Normal.Enabled;
flag = _NEW_ARRAY_NORMAL;
break;
case GL_COLOR_ARRAY:
- var = &ctx->Array.Color.Enabled;
+ var = &ctx->Array.ArrayObj->Color.Enabled;
flag = _NEW_ARRAY_COLOR0;
break;
case GL_INDEX_ARRAY:
- var = &ctx->Array.Index.Enabled;
+ var = &ctx->Array.ArrayObj->Index.Enabled;
flag = _NEW_ARRAY_INDEX;
break;
case GL_TEXTURE_COORD_ARRAY:
- var = &ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
+ var = &ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
flag = _NEW_ARRAY_TEXCOORD(ctx->Array.ActiveTexture);
break;
case GL_EDGE_FLAG_ARRAY:
- var = &ctx->Array.EdgeFlag.Enabled;
+ var = &ctx->Array.ArrayObj->EdgeFlag.Enabled;
flag = _NEW_ARRAY_EDGEFLAG;
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
- var = &ctx->Array.FogCoord.Enabled;
+ var = &ctx->Array.ArrayObj->FogCoord.Enabled;
flag = _NEW_ARRAY_FOGCOORD;
break;
case GL_SECONDARY_COLOR_ARRAY_EXT:
- var = &ctx->Array.SecondaryColor.Enabled;
+ var = &ctx->Array.ArrayObj->SecondaryColor.Enabled;
flag = _NEW_ARRAY_COLOR1;
break;
@@ -109,7 +109,7 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
CHECK_EXTENSION(NV_vertex_program, cap);
{
GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV;
- var = &ctx->Array.VertexAttrib[n].Enabled;
+ var = &ctx->Array.ArrayObj->VertexAttrib[n].Enabled;
flag = _NEW_ARRAY_ATTRIB(n);
}
break;
@@ -129,9 +129,9 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
*var = state;
if (state)
- ctx->Array._Enabled |= flag;
+ ctx->Array.ArrayObj->_Enabled |= flag;
else
- ctx->Array._Enabled &= ~flag;
+ ctx->Array.ArrayObj->_Enabled &= ~flag;
if (ctx->Driver.Enable) {
(*ctx->Driver.Enable)( ctx, cap, state );
@@ -1206,23 +1206,23 @@ _mesa_IsEnabled( GLenum cap )
* CLIENT STATE!!!
*/
case GL_VERTEX_ARRAY:
- return (ctx->Array.Vertex.Enabled != 0);
+ return (ctx->Array.ArrayObj->Vertex.Enabled != 0);
case GL_NORMAL_ARRAY:
- return (ctx->Array.Normal.Enabled != 0);
+ return (ctx->Array.ArrayObj->Normal.Enabled != 0);
case GL_COLOR_ARRAY:
- return (ctx->Array.Color.Enabled != 0);
+ return (ctx->Array.ArrayObj->Color.Enabled != 0);
case GL_INDEX_ARRAY:
- return (ctx->Array.Index.Enabled != 0);
+ return (ctx->Array.ArrayObj->Index.Enabled != 0);
case GL_TEXTURE_COORD_ARRAY:
- return (ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled != 0);
+ return (ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled != 0);
case GL_EDGE_FLAG_ARRAY:
- return (ctx->Array.EdgeFlag.Enabled != 0);
+ return (ctx->Array.ArrayObj->EdgeFlag.Enabled != 0);
case GL_FOG_COORDINATE_ARRAY_EXT:
CHECK_EXTENSION(EXT_fog_coord);
- return (ctx->Array.FogCoord.Enabled != 0);
+ return (ctx->Array.ArrayObj->FogCoord.Enabled != 0);
case GL_SECONDARY_COLOR_ARRAY_EXT:
CHECK_EXTENSION(EXT_secondary_color);
- return (ctx->Array.SecondaryColor.Enabled != 0);
+ return (ctx->Array.ArrayObj->SecondaryColor.Enabled != 0);
/* GL_EXT_histogram */
case GL_HISTOGRAM:
@@ -1331,7 +1331,7 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(NV_vertex_program);
{
GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV;
- return (ctx->Array.VertexAttrib[n].Enabled != 0);
+ return (ctx->Array.ArrayObj->VertexAttrib[n].Enabled != 0);
}
case GL_MAP1_VERTEX_ATTRIB0_4_NV:
case GL_MAP1_VERTEX_ATTRIB1_4_NV:
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index ecda0bfb5ed..2b3a275dba8 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -1593,6 +1593,7 @@ static const char enum_string_table[] =
"GL_VENDOR\0"
"GL_VERSION\0"
"GL_VERTEX_ARRAY\0"
+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
"GL_VERTEX_ARRAY_BUFFER_BINDING\0"
"GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
"GL_VERTEX_ARRAY_POINTER\0"
@@ -1654,7 +1655,7 @@ static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1617] =
+static const enum_elt all_enums[1618] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -3214,70 +3215,70 @@ static const enum_elt all_enums[1617] =
{ 33142, 0x00001F00 }, /* GL_VENDOR */
{ 33152, 0x00001F02 }, /* GL_VERSION */
{ 33163, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 33179, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 33210, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 33245, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 33269, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 33290, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 33313, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 33334, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 33361, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 33389, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 33417, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 33445, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 33473, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 33501, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 33529, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 33556, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 33583, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 33610, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 33637, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 33664, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 33691, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 33718, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 33745, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 33772, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 33810, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 33852, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 33887, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 33925, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 33960, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 33992, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 34026, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 34058, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 34078, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 34100, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 34129, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 34150, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 34183, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 34215, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 34246, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 34276, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 34297, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 34324, 0x00000BA2 }, /* GL_VIEWPORT */
- { 34336, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 34352, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 34372, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 34403, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 34438, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 34466, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 34491, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 34518, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 34543, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 34567, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 34586, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 34600, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 34618, 0x00001506 }, /* GL_XOR */
- { 34625, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 34644, 0x00008757 }, /* GL_YCBCR_MESA */
- { 34658, 0x00000000 }, /* GL_ZERO */
- { 34666, 0x00000D16 }, /* GL_ZOOM_X */
- { 34676, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 33179, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 33209, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 33240, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 33275, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 33299, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 33320, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 33343, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 33364, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 33391, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 33419, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 33447, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 33475, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 33503, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 33531, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 33559, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 33586, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 33613, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 33640, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 33667, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 33694, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 33721, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 33748, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 33775, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 33802, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 33840, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 33882, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 33917, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 33955, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 33990, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 34022, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 34056, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 34088, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 34108, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 34130, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 34159, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 34180, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 34213, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 34245, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 34276, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 34306, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 34327, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 34354, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 34366, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 34382, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 34402, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 34433, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 34468, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 34496, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 34521, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 34548, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 34573, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 34597, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 34616, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 34630, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 34648, 0x00001506 }, /* GL_XOR */
+ { 34655, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 34674, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 34688, 0x00000000 }, /* GL_ZERO */
+ { 34696, 0x00000D16 }, /* GL_ZOOM_X */
+ { 34706, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1236] =
+static const unsigned reduced_enums[1237] =
{
- 26, /* GL_ALL_CLIENT_ATTRIB_BITS */
389, /* GL_FALSE */
566, /* GL_LINES */
568, /* GL_LINE_LOOP */
@@ -3418,7 +3419,7 @@ static const unsigned reduced_enums[1236] =
1309, /* GL_STENCIL_WRITEMASK */
710, /* GL_MATRIX_MODE */
867, /* GL_NORMALIZE */
- 1598, /* GL_VIEWPORT */
+ 1599, /* GL_VIEWPORT */
841, /* GL_MODELVIEW_STACK_DEPTH */
1099, /* GL_PROJECTION_STACK_DEPTH */
1500, /* GL_TEXTURE_STACK_DEPTH */
@@ -3498,8 +3499,8 @@ static const unsigned reduced_enums[1236] =
513, /* GL_INDEX_OFFSET */
1139, /* GL_RED_SCALE */
1137, /* GL_RED_BIAS */
- 1615, /* GL_ZOOM_X */
- 1616, /* GL_ZOOM_Y */
+ 1616, /* GL_ZOOM_X */
+ 1617, /* GL_ZOOM_Y */
476, /* GL_GREEN_SCALE */
474, /* GL_GREEN_BIAS */
86, /* GL_BLUE_SCALE */
@@ -3600,7 +3601,7 @@ static const unsigned reduced_enums[1236] =
246, /* GL_COPY */
46, /* GL_AND_INVERTED */
865, /* GL_NOOP */
- 1611, /* GL_XOR */
+ 1612, /* GL_XOR */
927, /* GL_OR */
866, /* GL_NOR */
380, /* GL_EQUIV */
@@ -3825,9 +3826,9 @@ static const unsigned reduced_enums[1236] =
503, /* GL_INDEX_ARRAY */
1435, /* GL_TEXTURE_COORD_ARRAY */
368, /* GL_EDGE_FLAG_ARRAY */
- 1561, /* GL_VERTEX_ARRAY_SIZE */
- 1563, /* GL_VERTEX_ARRAY_TYPE */
- 1562, /* GL_VERTEX_ARRAY_STRIDE */
+ 1562, /* GL_VERTEX_ARRAY_SIZE */
+ 1564, /* GL_VERTEX_ARRAY_TYPE */
+ 1563, /* GL_VERTEX_ARRAY_STRIDE */
873, /* GL_NORMAL_ARRAY_TYPE */
872, /* GL_NORMAL_ARRAY_STRIDE */
133, /* GL_COLOR_ARRAY_SIZE */
@@ -3839,7 +3840,7 @@ static const unsigned reduced_enums[1236] =
1441, /* GL_TEXTURE_COORD_ARRAY_TYPE */
1440, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
372, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1560, /* GL_VERTEX_ARRAY_POINTER */
+ 1561, /* GL_VERTEX_ARRAY_POINTER */
871, /* GL_NORMAL_ARRAY_POINTER */
132, /* GL_COLOR_ARRAY_POINTER */
506, /* GL_INDEX_ARRAY_POINTER */
@@ -3939,7 +3940,7 @@ static const unsigned reduced_enums[1236] =
251, /* GL_CULL_VERTEX_EXT */
253, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
252, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1608, /* GL_WRAP_BORDER_SUN */
+ 1609, /* GL_WRAP_BORDER_SUN */
1419, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
555, /* GL_LIGHT_MODEL_COLOR_CONTROL */
1240, /* GL_SINGLE_COLOR */
@@ -4092,18 +4093,19 @@ static const unsigned reduced_enums[1236] =
913, /* GL_OPERAND1_ALPHA */
919, /* GL_OPERAND2_ALPHA */
925, /* GL_OPERAND3_ALPHA_NV */
- 1612, /* GL_YCBCR_422_APPLE */
+ 1558, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ 1613, /* GL_YCBCR_422_APPLE */
1549, /* GL_UNSIGNED_SHORT_8_8_APPLE */
1551, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
1242, /* GL_SLICE_ACCUM_SUN */
1118, /* GL_QUAD_MESH_SUN */
1522, /* GL_TRIANGLE_MESH_SUN */
- 1589, /* GL_VERTEX_PROGRAM_ARB */
- 1597, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1582, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- 1585, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- 1586, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- 1587, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ 1590, /* GL_VERTEX_PROGRAM_ARB */
+ 1598, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1583, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ 1586, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ 1587, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ 1588, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
277, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
1076, /* GL_PROGRAM_LENGTH_ARB */
1090, /* GL_PROGRAM_STRING_ARB */
@@ -4124,33 +4126,33 @@ static const unsigned reduced_enums[1236] =
702, /* GL_MATRIX7_NV */
263, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
260, /* GL_CURRENT_MATRIX_ARB */
- 1592, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- 1594, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ 1593, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ 1595, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
1088, /* GL_PROGRAM_PARAMETER_NV */
- 1584, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ 1585, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
1092, /* GL_PROGRAM_TARGET_NV */
1089, /* GL_PROGRAM_RESIDENT_NV */
1507, /* GL_TRACK_MATRIX_NV */
1508, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1590, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1591, /* GL_VERTEX_PROGRAM_BINDING_NV */
1070, /* GL_PROGRAM_ERROR_POSITION_ARB */
291, /* GL_DEPTH_CLAMP_NV */
- 1564, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1571, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1572, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1573, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1574, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1575, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1576, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1577, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1578, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1579, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1565, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1566, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1567, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1568, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1569, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1570, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 1565, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1572, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1573, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1574, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1575, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1576, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1577, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1578, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1579, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1580, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1566, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1567, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1568, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1569, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1570, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1571, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
620, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
627, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
628, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
@@ -4189,14 +4191,14 @@ static const unsigned reduced_enums[1236] =
218, /* GL_COMPRESSED_TEXTURE_FORMATS */
788, /* GL_MAX_VERTEX_UNITS_ARB */
18, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1607, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1588, /* GL_VERTEX_BLEND_ARB */
+ 1608, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1589, /* GL_VERTEX_BLEND_ARB */
278, /* GL_CURRENT_WEIGHT_ARB */
- 1606, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1605, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1604, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1603, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1600, /* GL_WEIGHT_ARRAY_ARB */
+ 1607, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1606, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1605, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1604, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1601, /* GL_WEIGHT_ARRAY_ARB */
317, /* GL_DOT3_RGB */
318, /* GL_DOT3_RGBA */
216, /* GL_COMPRESSED_RGB_FXT1_3DFX */
@@ -4241,7 +4243,7 @@ static const unsigned reduced_enums[1236] =
843, /* GL_MODULATE_ADD_ATI */
844, /* GL_MODULATE_SIGNED_ADD_ATI */
845, /* GL_MODULATE_SUBTRACT_ATI */
- 1613, /* GL_YCBCR_MESA */
+ 1614, /* GL_YCBCR_MESA */
934, /* GL_PACK_INVERT_MESA */
97, /* GL_BUFFER_SIZE */
99, /* GL_BUFFER_USAGE */
@@ -4299,7 +4301,7 @@ static const unsigned reduced_enums[1236] =
1122, /* GL_QUERY_RESULT */
1124, /* GL_QUERY_RESULT_AVAILABLE */
785, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- 1583, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ 1584, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
308, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
307, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
774, /* GL_MAX_TEXTURE_COORDS_ARB */
@@ -4314,7 +4316,7 @@ static const unsigned reduced_enums[1236] =
373, /* GL_ELEMENT_ARRAY_BUFFER */
50, /* GL_ARRAY_BUFFER_BINDING */
375, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1558, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1559, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
869, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
130, /* GL_COLOR_ARRAY_BUFFER_BINDING */
504, /* GL_INDEX_ARRAY_BUFFER_BINDING */
@@ -4322,8 +4324,8 @@ static const unsigned reduced_enums[1236] =
369, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
1221, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
410, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1601, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1580, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1602, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1581, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
1075, /* GL_PROGRAM_INSTRUCTIONS_ARB */
750, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
1081, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
@@ -4349,7 +4351,7 @@ static const unsigned reduced_enums[1236] =
1096, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
1512, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
1130, /* GL_READ_ONLY */
- 1609, /* GL_WRITE_ONLY */
+ 1610, /* GL_WRITE_ONLY */
1132, /* GL_READ_WRITE */
91, /* GL_BUFFER_ACCESS */
93, /* GL_BUFFER_MAPPED */
@@ -4410,7 +4412,7 @@ static const unsigned reduced_enums[1236] =
803, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
1202, /* GL_SAMPLES_PASSED */
433, /* GL_FRAGMENT_SHADER_ARB */
- 1596, /* GL_VERTEX_SHADER_ARB */
+ 1597, /* GL_VERTEX_SHADER_ARB */
1086, /* GL_PROGRAM_OBJECT_ARB */
1234, /* GL_SHADER_OBJECT_ARB */
735, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
@@ -4513,6 +4515,7 @@ static const unsigned reduced_enums[1236] =
1217, /* GL_SCISSOR_BIT */
25, /* GL_ALL_ATTRIB_BITS */
850, /* GL_MULTISAMPLE_BIT */
+ 26, /* GL_ALL_CLIENT_ATTRIB_BITS */
};
#define Elements(x) sizeof(x)/sizeof(*x)
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5bd2515f053..3c85022d323 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -128,6 +128,7 @@ static const struct {
{ OFF, "GL_3DFX_texture_compression_FXT1", F(TDFX_texture_compression_FXT1) },
{ OFF, "GL_APPLE_client_storage", F(APPLE_client_storage) },
{ ON, "GL_APPLE_packed_pixels", F(APPLE_packed_pixels) },
+ { OFF, "GL_APPLE_vertex_array_object", F(APPLE_vertex_array_object) },
{ OFF, "GL_ATI_blend_equation_separate", F(EXT_blend_equation_separate) },
{ OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
{ OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
@@ -213,6 +214,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_ARB_vertex_buffer_object
ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;
#endif
+ ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;
#if FEATURE_ATI_fragment_shader
ctx->Extensions.ATI_fragment_shader = GL_TRUE;
#endif
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 2e2da7d933d..3da2e689888 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -961,79 +961,79 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
break;
case GL_VERTEX_ARRAY:
- params[0] = ctx->Array.Vertex.Enabled;
+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
break;
case GL_VERTEX_ARRAY_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.Vertex.Size);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
break;
case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.Vertex.Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
break;
case GL_VERTEX_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.Vertex.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
break;
case GL_VERTEX_ARRAY_COUNT_EXT:
params[0] = INT_TO_BOOLEAN(0);
break;
case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.Normal.Enabled);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
break;
case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.Normal.Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
break;
case GL_NORMAL_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.Normal.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
break;
case GL_NORMAL_ARRAY_COUNT_EXT:
params[0] = INT_TO_BOOLEAN(0);
break;
case GL_COLOR_ARRAY:
- params[0] = ctx->Array.Color.Enabled;
+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
break;
case GL_COLOR_ARRAY_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.Color.Size);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
break;
case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.Color.Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
break;
case GL_COLOR_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.Color.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
break;
case GL_COLOR_ARRAY_COUNT_EXT:
params[0] = INT_TO_BOOLEAN(0);
break;
case GL_INDEX_ARRAY:
- params[0] = ctx->Array.Index.Enabled;
+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
break;
case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.Index.Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
break;
case GL_INDEX_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.Index.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
break;
case GL_INDEX_ARRAY_COUNT_EXT:
params[0] = INT_TO_BOOLEAN(0);
break;
case GL_TEXTURE_COORD_ARRAY:
- params[0] = ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
break;
case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Size);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
break;
case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
break;
case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
break;
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
params[0] = INT_TO_BOOLEAN(0);
break;
case GL_EDGE_FLAG_ARRAY:
- params[0] = ctx->Array.EdgeFlag.Enabled;
+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
break;
case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = INT_TO_BOOLEAN(ctx->Array.EdgeFlag.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
break;
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
params[0] = INT_TO_BOOLEAN(0);
@@ -1307,19 +1307,19 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_SECONDARY_COLOR_ARRAY_EXT:
CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = ctx->Array.SecondaryColor.Enabled;
+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
break;
case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.SecondaryColor.Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
break;
case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.SecondaryColor.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
break;
case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.SecondaryColor.Size);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
break;
case GL_CURRENT_FOG_COORDINATE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
@@ -1330,15 +1330,15 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = ctx->Array.FogCoord.Enabled;
+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
break;
case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = ENUM_TO_BOOLEAN(ctx->Array.FogCoord.Type);
+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
break;
case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.FogCoord.Stride);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
break;
case GL_FOG_COORDINATE_SOURCE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
@@ -1410,67 +1410,67 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_VERTEX_ATTRIB_ARRAY0_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[0].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY1_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[1].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY2_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[2].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY3_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[3].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY4_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[4].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY5_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[5].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY6_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[6].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY7_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[7].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY8_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[8].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY9_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[9].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY10_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[10].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY11_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[11].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY12_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[12].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY13_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[13].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY14_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[14].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY15_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
- params[0] = ctx->Array.VertexAttrib[15].Enabled;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
break;
case GL_MAP1_VERTEX_ATTRIB0_4_NV:
CHECK_EXT1(NV_vertex_program, "GetBooleanv");
@@ -1582,35 +1582,35 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.Vertex.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
break;
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.Normal.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
break;
case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.Color.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
break;
case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.Index.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
break;
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
break;
case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.EdgeFlag.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
break;
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.SecondaryColor.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
break;
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(ctx->Array.FogCoord.BufferObj->Name);
+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
@@ -2779,79 +2779,79 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ctx->Pixel.ZoomY;
break;
case GL_VERTEX_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.Vertex.Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
break;
case GL_VERTEX_ARRAY_SIZE:
- params[0] = (GLfloat)(ctx->Array.Vertex.Size);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
break;
case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.Vertex.Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
break;
case GL_VERTEX_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.Vertex.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
break;
case GL_VERTEX_ARRAY_COUNT_EXT:
params[0] = (GLfloat)(0);
break;
case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_FLOAT(ctx->Array.Normal.Enabled);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
break;
case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.Normal.Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
break;
case GL_NORMAL_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.Normal.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
break;
case GL_NORMAL_ARRAY_COUNT_EXT:
params[0] = (GLfloat)(0);
break;
case GL_COLOR_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.Color.Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
break;
case GL_COLOR_ARRAY_SIZE:
- params[0] = (GLfloat)(ctx->Array.Color.Size);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
break;
case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.Color.Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
break;
case GL_COLOR_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.Color.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
break;
case GL_COLOR_ARRAY_COUNT_EXT:
params[0] = (GLfloat)(0);
break;
case GL_INDEX_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.Index.Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
break;
case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.Index.Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
break;
case GL_INDEX_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.Index.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
break;
case GL_INDEX_ARRAY_COUNT_EXT:
params[0] = (GLfloat)(0);
break;
case GL_TEXTURE_COORD_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
break;
case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = (GLfloat)(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Size);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
break;
case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_FLOAT(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
break;
case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
break;
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
params[0] = (GLfloat)(0);
break;
case GL_EDGE_FLAG_ARRAY:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.EdgeFlag.Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
break;
case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = (GLfloat)(ctx->Array.EdgeFlag.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
break;
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
params[0] = (GLfloat)(0);
@@ -3125,19 +3125,19 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_SECONDARY_COLOR_ARRAY_EXT:
CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.SecondaryColor.Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
break;
case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Array.SecondaryColor.Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
break;
case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.SecondaryColor.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
break;
case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.SecondaryColor.Size);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
break;
case GL_CURRENT_FOG_COORDINATE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetFloatv");
@@ -3148,15 +3148,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.FogCoord.Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
break;
case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = ENUM_TO_FLOAT(ctx->Array.FogCoord.Type);
+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
break;
case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.FogCoord.Stride);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
break;
case GL_FOG_COORDINATE_SOURCE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetFloatv");
@@ -3228,67 +3228,67 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_VERTEX_ATTRIB_ARRAY0_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[0].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY1_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[1].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY2_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[2].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY3_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[3].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY4_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[4].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY5_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[5].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY6_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[6].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY7_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[7].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY8_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[8].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY9_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[9].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY10_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[10].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY11_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[11].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY12_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[12].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY13_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[13].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY14_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[14].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY15_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
- params[0] = BOOLEAN_TO_FLOAT(ctx->Array.VertexAttrib[15].Enabled);
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
break;
case GL_MAP1_VERTEX_ATTRIB0_4_NV:
CHECK_EXT1(NV_vertex_program, "GetFloatv");
@@ -3400,35 +3400,35 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.Vertex.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
break;
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.Normal.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
break;
case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.Color.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
break;
case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.Index.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
break;
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
break;
case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.EdgeFlag.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
break;
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.SecondaryColor.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
break;
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
- params[0] = (GLfloat)(ctx->Array.FogCoord.BufferObj->Name);
+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
@@ -4597,79 +4597,79 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = IROUND(ctx->Pixel.ZoomY);
break;
case GL_VERTEX_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.Vertex.Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
break;
case GL_VERTEX_ARRAY_SIZE:
- params[0] = ctx->Array.Vertex.Size;
+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
break;
case GL_VERTEX_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.Vertex.Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
break;
case GL_VERTEX_ARRAY_STRIDE:
- params[0] = ctx->Array.Vertex.Stride;
+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
break;
case GL_VERTEX_ARRAY_COUNT_EXT:
params[0] = 0;
break;
case GL_NORMAL_ARRAY:
- params[0] = ENUM_TO_INT(ctx->Array.Normal.Enabled);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
break;
case GL_NORMAL_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.Normal.Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
break;
case GL_NORMAL_ARRAY_STRIDE:
- params[0] = ctx->Array.Normal.Stride;
+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
break;
case GL_NORMAL_ARRAY_COUNT_EXT:
params[0] = 0;
break;
case GL_COLOR_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.Color.Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
break;
case GL_COLOR_ARRAY_SIZE:
- params[0] = ctx->Array.Color.Size;
+ params[0] = ctx->Array.ArrayObj->Color.Size;
break;
case GL_COLOR_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.Color.Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
break;
case GL_COLOR_ARRAY_STRIDE:
- params[0] = ctx->Array.Color.Stride;
+ params[0] = ctx->Array.ArrayObj->Color.Stride;
break;
case GL_COLOR_ARRAY_COUNT_EXT:
params[0] = 0;
break;
case GL_INDEX_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.Index.Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
break;
case GL_INDEX_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.Index.Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
break;
case GL_INDEX_ARRAY_STRIDE:
- params[0] = ctx->Array.Index.Stride;
+ params[0] = ctx->Array.ArrayObj->Index.Stride;
break;
case GL_INDEX_ARRAY_COUNT_EXT:
params[0] = 0;
break;
case GL_TEXTURE_COORD_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
break;
case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = ctx->Array.TexCoord[ctx->Array.ActiveTexture].Size;
+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
break;
case GL_TEXTURE_COORD_ARRAY_TYPE:
- params[0] = ENUM_TO_INT(ctx->Array.TexCoord[ctx->Array.ActiveTexture].Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
break;
case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = ctx->Array.TexCoord[ctx->Array.ActiveTexture].Stride;
+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
break;
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
params[0] = 0;
break;
case GL_EDGE_FLAG_ARRAY:
- params[0] = BOOLEAN_TO_INT(ctx->Array.EdgeFlag.Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
break;
case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = ctx->Array.EdgeFlag.Stride;
+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
break;
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
params[0] = 0;
@@ -4943,19 +4943,19 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_SECONDARY_COLOR_ARRAY_EXT:
CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.SecondaryColor.Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
break;
case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Array.SecondaryColor.Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
break;
case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = ctx->Array.SecondaryColor.Stride;
+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
break;
case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
- params[0] = ctx->Array.SecondaryColor.Size;
+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
break;
case GL_CURRENT_FOG_COORDINATE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
@@ -4966,15 +4966,15 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.FogCoord.Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
break;
case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = ENUM_TO_INT(ctx->Array.FogCoord.Type);
+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
break;
case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
- params[0] = ctx->Array.FogCoord.Stride;
+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
break;
case GL_FOG_COORDINATE_SOURCE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
@@ -5046,67 +5046,67 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_VERTEX_ATTRIB_ARRAY0_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[0].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY1_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[1].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY2_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[2].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY3_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[3].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY4_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[4].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY5_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[5].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY6_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[6].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY7_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[7].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY8_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[8].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY9_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[9].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY10_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[10].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY11_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[11].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY12_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[12].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY13_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[13].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY14_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[14].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
break;
case GL_VERTEX_ATTRIB_ARRAY15_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
- params[0] = BOOLEAN_TO_INT(ctx->Array.VertexAttrib[15].Enabled);
+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
break;
case GL_MAP1_VERTEX_ATTRIB0_4_NV:
CHECK_EXT1(NV_vertex_program, "GetIntegerv");
@@ -5218,35 +5218,35 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.Vertex.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
break;
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.Normal.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
break;
case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.Color.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
break;
case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.Index.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
break;
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
break;
case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.EdgeFlag.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
break;
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.SecondaryColor.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
break;
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
- params[0] = ctx->Array.FogCoord.BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 78d50663550..e6e1828800f 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -463,35 +463,35 @@ StateVars = [
( "GL_ZOOM_Y", GLfloat, ["ctx->Pixel.ZoomY"], "", None ),
# Vertex arrays
- ( "GL_VERTEX_ARRAY", GLboolean, ["ctx->Array.Vertex.Enabled"], "", None ),
- ( "GL_VERTEX_ARRAY_SIZE", GLint, ["ctx->Array.Vertex.Size"], "", None ),
- ( "GL_VERTEX_ARRAY_TYPE", GLenum, ["ctx->Array.Vertex.Type"], "", None ),
- ( "GL_VERTEX_ARRAY_STRIDE", GLint, ["ctx->Array.Vertex.Stride"], "", None ),
+ ( "GL_VERTEX_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Vertex.Enabled"], "", None ),
+ ( "GL_VERTEX_ARRAY_SIZE", GLint, ["ctx->Array.ArrayObj->Vertex.Size"], "", None ),
+ ( "GL_VERTEX_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Vertex.Type"], "", None ),
+ ( "GL_VERTEX_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Vertex.Stride"], "", None ),
( "GL_VERTEX_ARRAY_COUNT_EXT", GLint, ["0"], "", None ),
- ( "GL_NORMAL_ARRAY", GLenum, ["ctx->Array.Normal.Enabled"], "", None ),
- ( "GL_NORMAL_ARRAY_TYPE", GLenum, ["ctx->Array.Normal.Type"], "", None ),
- ( "GL_NORMAL_ARRAY_STRIDE", GLint, ["ctx->Array.Normal.Stride"], "", None ),
+ ( "GL_NORMAL_ARRAY", GLenum, ["ctx->Array.ArrayObj->Normal.Enabled"], "", None ),
+ ( "GL_NORMAL_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Normal.Type"], "", None ),
+ ( "GL_NORMAL_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Normal.Stride"], "", None ),
( "GL_NORMAL_ARRAY_COUNT_EXT", GLint, ["0"], "", None ),
- ( "GL_COLOR_ARRAY", GLboolean, ["ctx->Array.Color.Enabled"], "", None ),
- ( "GL_COLOR_ARRAY_SIZE", GLint, ["ctx->Array.Color.Size"], "", None ),
- ( "GL_COLOR_ARRAY_TYPE", GLenum, ["ctx->Array.Color.Type"], "", None ),
- ( "GL_COLOR_ARRAY_STRIDE", GLint, ["ctx->Array.Color.Stride"], "", None ),
+ ( "GL_COLOR_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Color.Enabled"], "", None ),
+ ( "GL_COLOR_ARRAY_SIZE", GLint, ["ctx->Array.ArrayObj->Color.Size"], "", None ),
+ ( "GL_COLOR_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Color.Type"], "", None ),
+ ( "GL_COLOR_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Color.Stride"], "", None ),
( "GL_COLOR_ARRAY_COUNT_EXT", GLint, ["0"], "", None ),
- ( "GL_INDEX_ARRAY", GLboolean, ["ctx->Array.Index.Enabled"], "", None ),
- ( "GL_INDEX_ARRAY_TYPE", GLenum, ["ctx->Array.Index.Type"], "", None ),
- ( "GL_INDEX_ARRAY_STRIDE", GLint, ["ctx->Array.Index.Stride"], "", None ),
+ ( "GL_INDEX_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Index.Enabled"], "", None ),
+ ( "GL_INDEX_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Index.Type"], "", None ),
+ ( "GL_INDEX_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Index.Stride"], "", None ),
( "GL_INDEX_ARRAY_COUNT_EXT", GLint, ["0"], "", None ),
( "GL_TEXTURE_COORD_ARRAY", GLboolean,
- ["ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled"], "", None ),
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled"], "", None ),
( "GL_TEXTURE_COORD_ARRAY_SIZE", GLint,
- ["ctx->Array.TexCoord[ctx->Array.ActiveTexture].Size"], "", None ),
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size"], "", None ),
( "GL_TEXTURE_COORD_ARRAY_TYPE", GLenum,
- ["ctx->Array.TexCoord[ctx->Array.ActiveTexture].Type"], "", None ),
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type"], "", None ),
( "GL_TEXTURE_COORD_ARRAY_STRIDE", GLint,
- ["ctx->Array.TexCoord[ctx->Array.ActiveTexture].Stride"], "", None ),
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride"], "", None ),
( "GL_TEXTURE_COORD_ARRAY_COUNT_EXT", GLint, ["0"], "", None ),
- ( "GL_EDGE_FLAG_ARRAY", GLboolean, ["ctx->Array.EdgeFlag.Enabled"], "", None ),
- ( "GL_EDGE_FLAG_ARRAY_STRIDE", GLint, ["ctx->Array.EdgeFlag.Stride"], "", None ),
+ ( "GL_EDGE_FLAG_ARRAY", GLboolean, ["ctx->Array.ArrayObj->EdgeFlag.Enabled"], "", None ),
+ ( "GL_EDGE_FLAG_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->EdgeFlag.Stride"], "", None ),
( "GL_EDGE_FLAG_ARRAY_COUNT_EXT", GLint, ["0"], "", None ),
# GL_ARB_multitexture
@@ -641,23 +641,23 @@ StateVars = [
"ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]"],
"FLUSH_CURRENT(ctx, 0);", ["EXT_secondary_color"] ),
( "GL_SECONDARY_COLOR_ARRAY_EXT", GLboolean,
- ["ctx->Array.SecondaryColor.Enabled"], "", ["EXT_secondary_color"] ),
+ ["ctx->Array.ArrayObj->SecondaryColor.Enabled"], "", ["EXT_secondary_color"] ),
( "GL_SECONDARY_COLOR_ARRAY_TYPE_EXT", GLenum,
- ["ctx->Array.SecondaryColor.Type"], "", ["EXT_secondary_color"] ),
+ ["ctx->Array.ArrayObj->SecondaryColor.Type"], "", ["EXT_secondary_color"] ),
( "GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT", GLint,
- ["ctx->Array.SecondaryColor.Stride"], "", ["EXT_secondary_color"] ),
+ ["ctx->Array.ArrayObj->SecondaryColor.Stride"], "", ["EXT_secondary_color"] ),
( "GL_SECONDARY_COLOR_ARRAY_SIZE_EXT", GLint,
- ["ctx->Array.SecondaryColor.Size"], "", ["EXT_secondary_color"] ),
+ ["ctx->Array.ArrayObj->SecondaryColor.Size"], "", ["EXT_secondary_color"] ),
# GL_EXT_fog_coord
( "GL_CURRENT_FOG_COORDINATE_EXT", GLfloat,
["ctx->Current.Attrib[VERT_ATTRIB_FOG][0]"],
"FLUSH_CURRENT(ctx, 0);", ["EXT_fog_coord"] ),
- ( "GL_FOG_COORDINATE_ARRAY_EXT", GLboolean, ["ctx->Array.FogCoord.Enabled"],
+ ( "GL_FOG_COORDINATE_ARRAY_EXT", GLboolean, ["ctx->Array.ArrayObj->FogCoord.Enabled"],
"", ["EXT_fog_coord"] ),
- ( "GL_FOG_COORDINATE_ARRAY_TYPE_EXT", GLenum, ["ctx->Array.FogCoord.Type"],
+ ( "GL_FOG_COORDINATE_ARRAY_TYPE_EXT", GLenum, ["ctx->Array.ArrayObj->FogCoord.Type"],
"", ["EXT_fog_coord"] ),
- ( "GL_FOG_COORDINATE_ARRAY_STRIDE_EXT", GLint, ["ctx->Array.FogCoord.Stride"],
+ ( "GL_FOG_COORDINATE_ARRAY_STRIDE_EXT", GLint, ["ctx->Array.ArrayObj->FogCoord.Stride"],
"", ["EXT_fog_coord"] ),
( "GL_FOG_COORDINATE_SOURCE_EXT", GLenum, ["ctx->Fog.FogCoordinateSource"],
"", ["EXT_fog_coord"] ),
@@ -709,37 +709,37 @@ StateVars = [
["(ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0)"],
"", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY0_NV", GLboolean,
- ["ctx->Array.VertexAttrib[0].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[0].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY1_NV", GLboolean,
- ["ctx->Array.VertexAttrib[1].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[1].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY2_NV", GLboolean,
- ["ctx->Array.VertexAttrib[2].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[2].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY3_NV", GLboolean,
- ["ctx->Array.VertexAttrib[3].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[3].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY4_NV", GLboolean,
- ["ctx->Array.VertexAttrib[4].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[4].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY5_NV", GLboolean,
- ["ctx->Array.VertexAttrib[5].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[5].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY6_NV", GLboolean,
- ["ctx->Array.VertexAttrib[6].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[6].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY7_NV", GLboolean,
- ["ctx->Array.VertexAttrib[7].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[7].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY8_NV", GLboolean,
- ["ctx->Array.VertexAttrib[8].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[8].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY9_NV", GLboolean,
- ["ctx->Array.VertexAttrib[9].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[9].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY10_NV", GLboolean,
- ["ctx->Array.VertexAttrib[10].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[10].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY11_NV", GLboolean,
- ["ctx->Array.VertexAttrib[11].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[11].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY12_NV", GLboolean,
- ["ctx->Array.VertexAttrib[12].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[12].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY13_NV", GLboolean,
- ["ctx->Array.VertexAttrib[13].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[13].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY14_NV", GLboolean,
- ["ctx->Array.VertexAttrib[14].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[14].Enabled"], "", ["NV_vertex_program"] ),
( "GL_VERTEX_ATTRIB_ARRAY15_NV", GLboolean,
- ["ctx->Array.VertexAttrib[15].Enabled"], "", ["NV_vertex_program"] ),
+ ["ctx->Array.ArrayObj->VertexAttrib[15].Enabled"], "", ["NV_vertex_program"] ),
( "GL_MAP1_VERTEX_ATTRIB0_4_NV", GLboolean,
["ctx->Eval.Map1Attrib[0]"], "", ["NV_vertex_program"] ),
( "GL_MAP1_VERTEX_ATTRIB1_4_NV", GLboolean,
@@ -808,23 +808,23 @@ StateVars = [
( "GL_ARRAY_BUFFER_BINDING_ARB", GLint,
["ctx->Array.ArrayBufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
( "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.Vertex.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ["ctx->Array.ArrayObj->Vertex.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
( "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.Normal.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ["ctx->Array.ArrayObj->Normal.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
( "GL_COLOR_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.Color.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ["ctx->Array.ArrayObj->Color.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
( "GL_INDEX_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.Index.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ["ctx->Array.ArrayObj->Index.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
( "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.TexCoord[ctx->Array.ActiveTexture].BufferObj->Name"],
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name"],
"", ["ARB_vertex_buffer_object"] ),
( "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.EdgeFlag.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ["ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
( "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.SecondaryColor.BufferObj->Name"],
+ ["ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name"],
"", ["ARB_vertex_buffer_object"] ),
( "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB", GLint,
- ["ctx->Array.FogCoord.BufferObj->Name"],
+ ["ctx->Array.ArrayObj->FogCoord.BufferObj->Name"],
"", ["ARB_vertex_buffer_object"] ),
# GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported
( "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB", GLint,
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index b6eed5810cd..a741f8310be 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -182,28 +182,28 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.Vertex.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->Vertex.Ptr;
break;
case GL_NORMAL_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.Normal.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->Normal.Ptr;
break;
case GL_COLOR_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.Color.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->Color.Ptr;
break;
case GL_SECONDARY_COLOR_ARRAY_POINTER_EXT:
- *params = (GLvoid *) ctx->Array.SecondaryColor.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->SecondaryColor.Ptr;
break;
case GL_FOG_COORDINATE_ARRAY_POINTER_EXT:
- *params = (GLvoid *) ctx->Array.FogCoord.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->FogCoord.Ptr;
break;
case GL_INDEX_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.Index.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->Index.Ptr;
break;
case GL_TEXTURE_COORD_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.TexCoord[clientUnit].Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->TexCoord[clientUnit].Ptr;
break;
case GL_EDGE_FLAG_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.EdgeFlag.Ptr;
+ *params = (GLvoid *) ctx->Array.ArrayObj->EdgeFlag.Ptr;
break;
case GL_FEEDBACK_BUFFER_POINTER:
*params = ctx->Feedback.Buffer;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e9893dda619..4ef08dd0748 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1663,11 +1663,10 @@ struct gl_client_array
};
-/**
- * Vertex array state
- */
-struct gl_array_attrib
-{
+struct gl_array_object {
+ /** Name of the array object as received from glGenVertexArrayAPPLE. */
+ GLuint Name;
+
/** Conventional vertex arrays */
/*@{*/
struct gl_client_array Vertex;
@@ -1683,11 +1682,22 @@ struct gl_array_attrib
/** Generic arrays for vertex programs/shaders; */
struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
+ GLbitfield _Enabled; /**< mask of _NEW_ARRAY_* values */
+};
+
+
+/**
+ * Vertex array state
+ */
+struct gl_array_attrib
+{
+ struct gl_array_object *ArrayObj;
+ struct gl_array_object *DefaultArrayObj;
+
GLint ActiveTexture; /**< Client Active Texture */
GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
- GLbitfield _Enabled; /**< mask of _NEW_ARRAY_* values */
GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */
#if FEATURE_ARB_vertex_buffer_object
@@ -2103,6 +2113,9 @@ struct gl_shared_state
struct _mesa_HashTable *FrameBuffers;
#endif
+ /** Objects associated with the GL_APPLE_vertex_array_object extension. */
+ struct _mesa_HashTable *ArrayObjects;
+
void *DriverData; /**< Device driver shared state */
};
@@ -2460,6 +2473,7 @@ struct gl_extensions
/* vendor extensions */
GLboolean APPLE_client_storage;
GLboolean APPLE_packed_pixels;
+ GLboolean APPLE_vertex_array_object;
GLboolean ATI_texture_mirror_once;
GLboolean ATI_texture_env_combine3;
GLboolean ATI_fragment_shader;
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index dbf0834df45..56b835f5373 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -45,6 +45,7 @@
#if FEATURE_ARB_vertex_buffer_object
#include "bufferobj.h"
#endif
+#include "arrayobj.h"
#include "buffers.h"
#include "clip.h"
#include "colortab.h"
@@ -537,6 +538,12 @@ _mesa_init_exec_table(struct _glapi_table *exec)
/* glVertexAttrib*NV functions handled in api_loopback.c */
#endif
+ /* 273. GL_APPLE_vertex_array_object */
+ SET_BindVertexArrayAPPLE(exec, _mesa_BindVertexArrayAPPLE);
+ SET_DeleteVertexArraysAPPLE(exec, _mesa_DeleteVertexArraysAPPLE);
+ SET_GenVertexArraysAPPLE(exec, _mesa_GenVertexArraysAPPLE);
+ SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE);
+
/* 282. GL_NV_fragment_program */
#if FEATURE_NV_fragment_program
SET_ProgramNamedParameter4fNV(exec, _mesa_ProgramNamedParameter4fNV);
@@ -821,15 +828,15 @@ update_arrays( GLcontext *ctx )
/* 0 */
if (ctx->ShaderObjects._VertexShaderPresent
- && ctx->Array.VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) {
- min = ctx->Array.VertexAttrib[VERT_ATTRIB_GENERIC0]._MaxElement;
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) {
+ min = ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0]._MaxElement;
}
else if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Enabled) {
- min = ctx->Array.VertexAttrib[VERT_ATTRIB_POS]._MaxElement;
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) {
+ min = ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS]._MaxElement;
}
- else if (ctx->Array.Vertex.Enabled) {
- min = ctx->Array.Vertex._MaxElement;
+ else if (ctx->Array.ArrayObj->Vertex.Enabled) {
+ min = ctx->Array.ArrayObj->Vertex._MaxElement;
}
else {
/* can't draw anything without vertex positions! */
@@ -838,86 +845,86 @@ update_arrays( GLcontext *ctx )
/* 1 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_WEIGHT].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_WEIGHT]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_WEIGHT].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_WEIGHT]._MaxElement);
}
/* no conventional vertex weight array */
/* 2 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]._MaxElement);
}
- else if (ctx->Array.Normal.Enabled) {
- min = MIN2(min, ctx->Array.Normal._MaxElement);
+ else if (ctx->Array.ArrayObj->Normal.Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->Normal._MaxElement);
}
/* 3 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR0]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0]._MaxElement);
}
- else if (ctx->Array.Color.Enabled) {
- min = MIN2(min, ctx->Array.Color._MaxElement);
+ else if (ctx->Array.ArrayObj->Color.Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->Color._MaxElement);
}
/* 4 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR1]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1]._MaxElement);
}
- else if (ctx->Array.SecondaryColor.Enabled) {
- min = MIN2(min, ctx->Array.SecondaryColor._MaxElement);
+ else if (ctx->Array.ArrayObj->SecondaryColor.Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->SecondaryColor._MaxElement);
}
/* 5 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_FOG]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG]._MaxElement);
}
- else if (ctx->Array.FogCoord.Enabled) {
- min = MIN2(min, ctx->Array.FogCoord._MaxElement);
+ else if (ctx->Array.ArrayObj->FogCoord.Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->FogCoord._MaxElement);
}
/* 6 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX]._MaxElement);
}
- else if (ctx->Array.Index.Enabled) {
- min = MIN2(min, ctx->Array.Index._MaxElement);
+ else if (ctx->Array.ArrayObj->Index.Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->Index._MaxElement);
}
/* 7 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_SEVEN].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_SEVEN]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_SEVEN].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_SEVEN]._MaxElement);
}
/* 8..15 */
for (i = VERT_ATTRIB_TEX0; i <= VERT_ATTRIB_TEX7; i++) {
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[i].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[i]._MaxElement);
+ && ctx->Array.ArrayObj->VertexAttrib[i].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[i]._MaxElement);
}
else if (i - VERT_ATTRIB_TEX0 < ctx->Const.MaxTextureCoordUnits
- && ctx->Array.TexCoord[i - VERT_ATTRIB_TEX0].Enabled) {
- min = MIN2(min, ctx->Array.TexCoord[i - VERT_ATTRIB_TEX0]._MaxElement);
+ && ctx->Array.ArrayObj->TexCoord[i - VERT_ATTRIB_TEX0].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->TexCoord[i - VERT_ATTRIB_TEX0]._MaxElement);
}
}
/* 16..31 */
if (ctx->ShaderObjects._VertexShaderPresent) {
for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) {
- if (ctx->Array.VertexAttrib[i].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[i]._MaxElement);
+ if (ctx->Array.ArrayObj->VertexAttrib[i].Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[i]._MaxElement);
}
}
}
- if (ctx->Array.EdgeFlag.Enabled) {
- min = MIN2(min, ctx->Array.EdgeFlag._MaxElement);
+ if (ctx->Array.ArrayObj->EdgeFlag.Enabled) {
+ min = MIN2(min, ctx->Array.ArrayObj->EdgeFlag._MaxElement);
}
/* _MaxElement is one past the last legal array element */
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 97b02142936..47c13a3eea0 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -31,6 +31,7 @@
#include "enums.h"
#include "mtypes.h"
#include "varray.h"
+#include "arrayobj.h"
#include "dispatch.h"
#ifndef GL_BOOLEAN
@@ -119,7 +120,7 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- update_array(ctx, &ctx->Array.Vertex, _NEW_ARRAY_VERTEX,
+ update_array(ctx, &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
elementSize, size, type, stride, GL_FALSE, ptr);
if (ctx->Driver.VertexPointer)
@@ -164,7 +165,7 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
return;
}
- update_array(ctx, &ctx->Array.Normal, _NEW_ARRAY_NORMAL,
+ update_array(ctx, &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
elementSize, 3, type, stride, GL_TRUE, ptr);
if (ctx->Driver.NormalPointer)
@@ -222,7 +223,7 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- update_array(ctx, &ctx->Array.Color, _NEW_ARRAY_COLOR0,
+ update_array(ctx, &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
elementSize, size, type, stride, GL_TRUE, ptr);
if (ctx->Driver.ColorPointer)
@@ -254,7 +255,7 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- update_array(ctx, &ctx->Array.FogCoord, _NEW_ARRAY_FOGCOORD,
+ update_array(ctx, &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
elementSize, 1, type, stride, GL_FALSE, ptr);
if (ctx->Driver.FogCoordPointer)
@@ -295,7 +296,7 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- update_array(ctx, &ctx->Array.Index, _NEW_ARRAY_INDEX,
+ update_array(ctx, &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
elementSize, 1, type, stride, GL_FALSE, ptr);
if (ctx->Driver.IndexPointer)
@@ -354,7 +355,7 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
return;
}
- update_array(ctx, &ctx->Array.SecondaryColor, _NEW_ARRAY_COLOR1,
+ update_array(ctx, &ctx->Array.ArrayObj->SecondaryColor, _NEW_ARRAY_COLOR1,
elementSize, size, type, stride, GL_TRUE, ptr);
if (ctx->Driver.SecondaryColorPointer)
@@ -403,7 +404,7 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
return;
}
- update_array(ctx, &ctx->Array.TexCoord[unit], _NEW_ARRAY_TEXCOORD(unit),
+ update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit], _NEW_ARRAY_TEXCOORD(unit),
elementSize, size, type, stride, GL_FALSE, ptr);
if (ctx->Driver.TexCoordPointer)
@@ -422,7 +423,7 @@ _mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr)
return;
}
- update_array(ctx, &ctx->Array.EdgeFlag, _NEW_ARRAY_EDGEFLAG,
+ update_array(ctx, &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
sizeof(GLboolean), 1, GL_BOOLEAN, stride, GL_FALSE, ptr);
if (ctx->Driver.EdgeFlagPointer)
@@ -479,7 +480,7 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
return;
}
- update_array(ctx, &ctx->Array.VertexAttrib[index], _NEW_ARRAY_ATTRIB(index),
+ update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index], _NEW_ARRAY_ATTRIB(index),
elementSize, size, type, stride, normalized, ptr);
if (ctx->Driver.VertexAttribPointer)
@@ -550,7 +551,7 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
return;
}
- update_array(ctx, &ctx->Array.VertexAttrib[index], _NEW_ARRAY_ATTRIB(index),
+ update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index], _NEW_ARRAY_ATTRIB(index),
elementSize, size, type, stride, normalized, ptr);
/* XXX fix
@@ -923,73 +924,8 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
void
_mesa_init_varray(GLcontext *ctx)
{
- GLuint i;
-
- /* Vertex arrays */
- ctx->Array.Vertex.Size = 4;
- ctx->Array.Vertex.Type = GL_FLOAT;
- ctx->Array.Vertex.Stride = 0;
- ctx->Array.Vertex.StrideB = 0;
- ctx->Array.Vertex.Ptr = NULL;
- ctx->Array.Vertex.Enabled = GL_FALSE;
- ctx->Array.Vertex.Flags = CA_CLIENT_DATA;
- ctx->Array.Normal.Type = GL_FLOAT;
- ctx->Array.Normal.Stride = 0;
- ctx->Array.Normal.StrideB = 0;
- ctx->Array.Normal.Ptr = NULL;
- ctx->Array.Normal.Enabled = GL_FALSE;
- ctx->Array.Normal.Flags = CA_CLIENT_DATA;
- ctx->Array.Color.Size = 4;
- ctx->Array.Color.Type = GL_FLOAT;
- ctx->Array.Color.Stride = 0;
- ctx->Array.Color.StrideB = 0;
- ctx->Array.Color.Ptr = NULL;
- ctx->Array.Color.Enabled = GL_FALSE;
- ctx->Array.Color.Flags = CA_CLIENT_DATA;
- ctx->Array.SecondaryColor.Size = 4;
- ctx->Array.SecondaryColor.Type = GL_FLOAT;
- ctx->Array.SecondaryColor.Stride = 0;
- ctx->Array.SecondaryColor.StrideB = 0;
- ctx->Array.SecondaryColor.Ptr = NULL;
- ctx->Array.SecondaryColor.Enabled = GL_FALSE;
- ctx->Array.SecondaryColor.Flags = CA_CLIENT_DATA;
- ctx->Array.FogCoord.Size = 1;
- ctx->Array.FogCoord.Type = GL_FLOAT;
- ctx->Array.FogCoord.Stride = 0;
- ctx->Array.FogCoord.StrideB = 0;
- ctx->Array.FogCoord.Ptr = NULL;
- ctx->Array.FogCoord.Enabled = GL_FALSE;
- ctx->Array.FogCoord.Flags = CA_CLIENT_DATA;
- ctx->Array.Index.Type = GL_FLOAT;
- ctx->Array.Index.Stride = 0;
- ctx->Array.Index.StrideB = 0;
- ctx->Array.Index.Ptr = NULL;
- ctx->Array.Index.Enabled = GL_FALSE;
- ctx->Array.Index.Flags = CA_CLIENT_DATA;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
- ctx->Array.TexCoord[i].Size = 4;
- ctx->Array.TexCoord[i].Type = GL_FLOAT;
- ctx->Array.TexCoord[i].Stride = 0;
- ctx->Array.TexCoord[i].StrideB = 0;
- ctx->Array.TexCoord[i].Ptr = NULL;
- ctx->Array.TexCoord[i].Enabled = GL_FALSE;
- ctx->Array.TexCoord[i].Flags = CA_CLIENT_DATA;
- }
- ctx->Array.EdgeFlag.Stride = 0;
- ctx->Array.EdgeFlag.StrideB = 0;
- ctx->Array.EdgeFlag.Ptr = NULL;
- ctx->Array.EdgeFlag.Enabled = GL_FALSE;
- ctx->Array.EdgeFlag.Flags = CA_CLIENT_DATA;
- for (i = 0; i < VERT_ATTRIB_MAX; i++) {
- ctx->Array.VertexAttrib[i].Size = 4;
- ctx->Array.VertexAttrib[i].Type = GL_FLOAT;
- ctx->Array.VertexAttrib[i].Stride = 0;
- ctx->Array.VertexAttrib[i].StrideB = 0;
- ctx->Array.VertexAttrib[i].Ptr = NULL;
- ctx->Array.VertexAttrib[i].Enabled = GL_FALSE;
- ctx->Array.VertexAttrib[i].Normalized = GL_FALSE;
- ctx->Array.VertexAttrib[i].Flags = CA_CLIENT_DATA;
- }
+ ctx->Array.DefaultArrayObj = _mesa_new_array_object(ctx, 0);
+ ctx->Array.ArrayObj = ctx->Array.DefaultArrayObj;
ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */
}
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 4771c694656..8283033f864 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -51,8 +51,8 @@ _mesa_EnableVertexAttribArrayARB(GLuint index)
}
FLUSH_VERTICES(ctx, _NEW_ARRAY);
- ctx->Array.VertexAttrib[index].Enabled = GL_TRUE;
- ctx->Array._Enabled |= _NEW_ARRAY_ATTRIB(index);
+ ctx->Array.ArrayObj->VertexAttrib[index].Enabled = GL_TRUE;
+ ctx->Array.ArrayObj->_Enabled |= _NEW_ARRAY_ATTRIB(index);
ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index);
}
@@ -70,8 +70,8 @@ _mesa_DisableVertexAttribArrayARB(GLuint index)
}
FLUSH_VERTICES(ctx, _NEW_ARRAY);
- ctx->Array.VertexAttrib[index].Enabled = GL_FALSE;
- ctx->Array._Enabled &= ~_NEW_ARRAY_ATTRIB(index);
+ ctx->Array.ArrayObj->VertexAttrib[index].Enabled = GL_FALSE;
+ ctx->Array.ArrayObj->_Enabled &= ~_NEW_ARRAY_ATTRIB(index);
ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index);
}
@@ -108,19 +108,19 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
switch (pname) {
case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Enabled;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Enabled;
break;
case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Size;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Size;
break;
case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Stride;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Stride;
break;
case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Type;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Type;
break;
case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB:
- params[0] = ctx->Array.VertexAttrib[index].Normalized;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Normalized;
break;
case GL_CURRENT_VERTEX_ATTRIB_ARB:
FLUSH_CURRENT(ctx, 0);
@@ -131,7 +131,7 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
_mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribfvARB(pname)");
return;
}
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].BufferObj->Name;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].BufferObj->Name;
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribfvARB(pname)");
@@ -175,7 +175,7 @@ _mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer)
return;
}
- *pointer = (GLvoid *) ctx->Array.VertexAttrib[index].Ptr;;
+ *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[index].Ptr;
}
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c
index a485a1733f7..758d62c1378 100644
--- a/src/mesa/shader/nvprogram.c
+++ b/src/mesa/shader/nvprogram.c
@@ -371,13 +371,13 @@ _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params)
switch (pname) {
case GL_ATTRIB_ARRAY_SIZE_NV:
- params[0] = ctx->Array.VertexAttrib[index].Size;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Size;
break;
case GL_ATTRIB_ARRAY_STRIDE_NV:
- params[0] = ctx->Array.VertexAttrib[index].Stride;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Stride;
break;
case GL_ATTRIB_ARRAY_TYPE_NV:
- params[0] = ctx->Array.VertexAttrib[index].Type;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Type;
break;
case GL_CURRENT_ATTRIB_NV:
FLUSH_CURRENT(ctx, 0);
@@ -407,13 +407,13 @@ _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params)
switch (pname) {
case GL_ATTRIB_ARRAY_SIZE_NV:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Size;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Size;
break;
case GL_ATTRIB_ARRAY_STRIDE_NV:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Stride;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Stride;
break;
case GL_ATTRIB_ARRAY_TYPE_NV:
- params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Type;
+ params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Type;
break;
case GL_CURRENT_ATTRIB_NV:
FLUSH_CURRENT(ctx, 0);
@@ -443,13 +443,13 @@ _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params)
switch (pname) {
case GL_ATTRIB_ARRAY_SIZE_NV:
- params[0] = ctx->Array.VertexAttrib[index].Size;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Size;
break;
case GL_ATTRIB_ARRAY_STRIDE_NV:
- params[0] = ctx->Array.VertexAttrib[index].Stride;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Stride;
break;
case GL_ATTRIB_ARRAY_TYPE_NV:
- params[0] = ctx->Array.VertexAttrib[index].Type;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Type;
break;
case GL_CURRENT_ATTRIB_NV:
FLUSH_CURRENT(ctx, 0);
@@ -463,7 +463,7 @@ _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params)
_mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV");
return;
}
- params[0] = ctx->Array.VertexAttrib[index].BufferObj->Name;
+ params[0] = ctx->Array.ArrayObj->VertexAttrib[index].BufferObj->Name;
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV");
@@ -493,7 +493,7 @@ _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer)
return;
}
- *pointer = (GLvoid *) ctx->Array.VertexAttrib[index].Ptr;;
+ *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[index].Ptr;
}
diff --git a/src/mesa/sources b/src/mesa/sources
index fff5082db15..905052d460f 100644
--- a/src/mesa/sources
+++ b/src/mesa/sources
@@ -7,6 +7,7 @@ MAIN_SOURCES = \
main/api_validate.c \
main/accum.c \
main/attrib.c \
+ main/arrayobj.c \
main/blend.c \
main/bufferobj.c \
main/buffers.c \
diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S
index 692cfd60b75..b947ec2250d 100644
--- a/src/mesa/sparc/glapi_sparc.S
+++ b/src/mesa/sparc/glapi_sparc.S
@@ -884,6 +884,10 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */
.globl glGetQueryObjecti64vEXT ; .type glGetQueryObjecti64vEXT,#function
.globl glGetQueryObjectui64vEXT ; .type glGetQueryObjectui64vEXT,#function
.globl glBlitFramebufferEXT ; .type glBlitFramebufferEXT,#function
+ .globl glBindVertexArrayAPPLE ; .type glBindVertexArrayAPPLE,#function
+ .globl glDeleteVertexArraysAPPLE ; .type glDeleteVertexArraysAPPLE,#function
+ .globl glGenVertexArraysAPPLE ; .type glGenVertexArraysAPPLE,#function
+ .globl glIsVertexArrayAPPLE ; .type glIsVertexArrayAPPLE,#function
.globl _mesa_sparc_glapi_begin ; .type _mesa_sparc_glapi_begin,#function
_mesa_sparc_glapi_begin:
@@ -1706,6 +1710,10 @@ _mesa_sparc_glapi_begin:
GL_STUB(glGetQueryObjecti64vEXT, _gloffset_GetQueryObjecti64vEXT)
GL_STUB(glGetQueryObjectui64vEXT, _gloffset_GetQueryObjectui64vEXT)
GL_STUB(glBlitFramebufferEXT, _gloffset_BlitFramebufferEXT)
+ GL_STUB(glBindVertexArrayAPPLE, _gloffset_BindVertexArrayAPPLE)
+ GL_STUB(glDeleteVertexArraysAPPLE, _gloffset_DeleteVertexArraysAPPLE)
+ GL_STUB(glGenVertexArraysAPPLE, _gloffset_GenVertexArraysAPPLE)
+ GL_STUB(glIsVertexArrayAPPLE, _gloffset_IsVertexArrayAPPLE)
.globl _mesa_sparc_glapi_end ; .type _mesa_sparc_glapi_end,#function
_mesa_sparc_glapi_end:
diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c
index 0fb3529b6b2..38950d66b8d 100644
--- a/src/mesa/tnl/t_array_import.c
+++ b/src/mesa/tnl/t_array_import.c
@@ -274,7 +274,7 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLint end)
* arrays have priority over the conventional vertex arrays.
*/
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[index].Enabled) {
+ && ctx->Array.ArrayObj->VertexAttrib[index].Enabled) {
/* Use generic attribute array */
_tnl_import_attrib( ctx, index, GL_FALSE, GL_TRUE );
VB->AttribPtr[index] = &tmp->Attribs[index];
diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S
index d976d53fe4b..d0ecb086025 100644
--- a/src/mesa/x86-64/glapi_x86-64.S
+++ b/src/mesa/x86-64/glapi_x86-64.S
@@ -30936,6 +30936,138 @@ GL_PREFIX(BlitFramebufferEXT):
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BlitFramebufferEXT), .-GL_PREFIX(BlitFramebufferEXT)
+ .p2align 4,,15
+ .globl GL_PREFIX(BindVertexArrayAPPLE)
+ .type GL_PREFIX(BindVertexArrayAPPLE), @function
+GL_PREFIX(BindVertexArrayAPPLE):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6552(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ call _x86_64_get_dispatch@PLT
+ popq %rdi
+ movq 6552(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6552(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ call _glapi_get_dispatch
+ popq %rdi
+ movq 6552(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(BindVertexArrayAPPLE), .-GL_PREFIX(BindVertexArrayAPPLE)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(DeleteVertexArraysAPPLE)
+ .type GL_PREFIX(DeleteVertexArraysAPPLE), @function
+GL_PREFIX(DeleteVertexArraysAPPLE):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6560(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6560(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6560(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6560(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(DeleteVertexArraysAPPLE), .-GL_PREFIX(DeleteVertexArraysAPPLE)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(GenVertexArraysAPPLE)
+ .type GL_PREFIX(GenVertexArraysAPPLE), @function
+GL_PREFIX(GenVertexArraysAPPLE):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6568(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6568(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6568(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6568(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(GenVertexArraysAPPLE), .-GL_PREFIX(GenVertexArraysAPPLE)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(IsVertexArrayAPPLE)
+ .type GL_PREFIX(IsVertexArrayAPPLE), @function
+GL_PREFIX(IsVertexArrayAPPLE):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6576(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ call _x86_64_get_dispatch@PLT
+ popq %rdi
+ movq 6576(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6576(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ call _glapi_get_dispatch
+ popq %rdi
+ movq 6576(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(IsVertexArrayAPPLE), .-GL_PREFIX(IsVertexArrayAPPLE)
+
.globl GL_PREFIX(ArrayElementEXT) ; .set GL_PREFIX(ArrayElementEXT), GL_PREFIX(ArrayElement)
.globl GL_PREFIX(BindTextureEXT) ; .set GL_PREFIX(BindTextureEXT), GL_PREFIX(BindTexture)
.globl GL_PREFIX(DrawArraysEXT) ; .set GL_PREFIX(DrawArraysEXT), GL_PREFIX(DrawArrays)
@@ -31127,7 +31259,7 @@ GL_PREFIX(BlitFramebufferEXT):
.long 2,4,20 /* Minimum kernel version w/TLS */
3: .p2align 2 /* pad out section */
#endif /* GLX_USE_TLS */
-
+
#if defined (__ELF__) && defined (__linux__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index ed79797d321..3c44749d256 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -960,6 +960,10 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB(GetQueryObjecti64vEXT, _gloffset_GetQueryObjecti64vEXT, GetQueryObjecti64vEXT@12)
GL_STUB(GetQueryObjectui64vEXT, _gloffset_GetQueryObjectui64vEXT, GetQueryObjectui64vEXT@12)
GL_STUB(BlitFramebufferEXT, _gloffset_BlitFramebufferEXT, BlitFramebufferEXT@40)
+ GL_STUB(BindVertexArrayAPPLE, _gloffset_BindVertexArrayAPPLE, BindVertexArrayAPPLE@4)
+ GL_STUB(DeleteVertexArraysAPPLE, _gloffset_DeleteVertexArraysAPPLE, DeleteVertexArraysAPPLE@8)
+ GL_STUB(GenVertexArraysAPPLE, _gloffset_GenVertexArraysAPPLE, GenVertexArraysAPPLE@8)
+ GL_STUB(IsVertexArrayAPPLE, _gloffset_IsVertexArrayAPPLE, IsVertexArrayAPPLE@4)
GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4)
GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8)
GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12)
@@ -1156,7 +1160,7 @@ GLNAME(gl_dispatch_functions_end):
.long 2,4,20 /* Minimum kernel version w/TLS */
3: .p2align 2 /* pad out section */
#endif /* GLX_USE_TLS */
-
-#if defined(__ELF__) && defined(__linux__)
+
+#if defined (__ELF__) && defined (__linux__)
.section .note.GNU-stack,"",%progbits
#endif