added missing types to _mesa_VertexAttribPointerARB()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 11 Jun 2003 18:47:51 +0000 (18:47 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 11 Jun 2003 18:47:51 +0000 (18:47 +0000)
src/mesa/main/varray.c

index 5752a42577fea451ce8d432f91af0feb39892dc1..0251e89ae850c05cba24a3a86e33be3f7d3b969d 100644 (file)
@@ -527,13 +527,26 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
    }
 
    /* check for valid 'type' and compute StrideB right away */
+   /* NOTE: more types are supported here than in the NV extension */
    switch (type) {
+      case GL_BYTE:
+         ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLbyte);
+         break;
       case GL_UNSIGNED_BYTE:
          ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLubyte);
          break;
       case GL_SHORT:
          ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLshort);
          break;
+      case GL_UNSIGNED_SHORT:
+         ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLushort);
+         break;
+      case GL_INT:
+         ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLint);
+         break;
+      case GL_UNSIGNED_INT:
+         ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLuint);
+         break;
       case GL_FLOAT:
          ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLfloat);
          break;