summaryrefslogtreecommitdiff
path: root/src/mesa/array_cache/ac_import.c
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/array_cache/ac_import.c
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/array_cache/ac_import.c')
-rw-r--r--src/mesa/array_cache/ac_import.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c
index 62206002cd..deae44ab72 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? */