summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-04-25 00:21:32 +0000
committerBrian Paul <[email protected]>2006-04-25 00:21:32 +0000
commit095c6699f449ed4803f23e844cc0227743a9c3e1 (patch)
tree2446935d4cdb2ab45834a94e8780d90ddd66292e /src/mesa/main/varray.c
parentf12ea2d402e8f6d29dfd40c731351ff210887b58 (diff)
No longer alias generic vertex attribs with conventional attribs for GL_ARB_vertex_program.
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 87d9660b7ed..97b02142936 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -29,8 +29,6 @@
#include "context.h"
#include "enable.h"
#include "enums.h"
-#include "dlist.h"
-#include "texstate.h"
#include "mtypes.h"
#include "varray.h"
#include "dispatch.h"
@@ -47,7 +45,7 @@
*/
static void
update_array(GLcontext *ctx, struct gl_client_array *array,
- GLuint dirtyFlag, GLsizei elementSize,
+ GLbitfield dirtyFlag, GLsizei elementSize,
GLint size, GLenum type,
GLsizei stride, GLboolean normalized, const GLvoid *ptr)
{
@@ -437,6 +435,7 @@ void GLAPIENTRY
_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
GLsizei stride, const GLvoid *ptr)
{
+ const GLboolean normalized = GL_FALSE;
GLsizei elementSize;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -481,7 +480,7 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
}
update_array(ctx, &ctx->Array.VertexAttrib[index], _NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, stride, GL_FALSE, ptr);
+ elementSize, size, type, stride, normalized, ptr);
if (ctx->Driver.VertexAttribPointer)
ctx->Driver.VertexAttribPointer( ctx, index, size, type, stride, ptr );
@@ -754,6 +753,7 @@ _mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
_mesa_DisableClientState( GL_EDGE_FLAG_ARRAY );
_mesa_DisableClientState( GL_INDEX_ARRAY );
+ /* XXX also disable secondary color and generic arrays? */
/* Texcoords */
if (tflag) {
@@ -917,12 +917,11 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
}
-/**********************************************************************/
-/***** Initialization *****/
-/**********************************************************************/
-
+/**
+ * Initialize vertex array state for given context.
+ */
void
-_mesa_init_varray( GLcontext * ctx )
+_mesa_init_varray(GLcontext *ctx)
{
GLuint i;
@@ -981,7 +980,6 @@ _mesa_init_varray( GLcontext * ctx )
ctx->Array.EdgeFlag.Ptr = NULL;
ctx->Array.EdgeFlag.Enabled = GL_FALSE;
ctx->Array.EdgeFlag.Flags = CA_CLIENT_DATA;
- ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
ctx->Array.VertexAttrib[i].Size = 4;
ctx->Array.VertexAttrib[i].Type = GL_FLOAT;
@@ -989,6 +987,9 @@ _mesa_init_varray( GLcontext * ctx )
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.ActiveTexture = 0; /* GL_ARB_multitexture */
}