Enable client-side arrays as necessary. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sun, 27 Apr 2008 05:10:35 -0400
branchtrunk
changeset 222 ed4421aa7e00
parent 221 328ac819b965
child 223 8df4e9545c87
Enable client-side arrays as necessary.
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Sun Apr 27 05:10:17 2008 -0400
+++ b/mojoshader_opengl.c	Sun Apr 27 05:10:35 2008 -0400
@@ -502,6 +502,7 @@
     {
         // !!! FIXME: fails if size==1.
         pglVertexPointer(size, opengl_posattr_type(type), stride, ptr);
+        pglEnableClientState(GL_VERTEX_ARRAY);
     } // if
 
     int i;
@@ -524,8 +525,9 @@
     if (gl_index != 0)
     {
         const GLenum gl_type = opengl_attr_type(type);
-        const GLboolean gl_norm = (normalized) ? GL_TRUE : GL_FALSE;
-        pglVertexAttribPointer(gl_index, size, gl_type, gl_norm, stride, ptr);
+        const GLboolean norm = (normalized) ? GL_TRUE : GL_FALSE;
+        pglVertexAttribPointerARB(gl_index, size, gl_type, norm, stride, ptr);
+        pglEnableVertexAttribArrayARB(gl_index);
     } // if
 } // MOJOSHADER_glSetVertexAttribute