From b7879fd991fc0570d6f746f5ce4b80b0e3dcb5e4 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 27 Apr 2008 05:10:35 -0400 Subject: [PATCH] Enable client-side arrays as necessary. --HG-- branch : trunk --- mojoshader_opengl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mojoshader_opengl.c b/mojoshader_opengl.c index 5626a2dd..ce3df0af 100644 --- a/mojoshader_opengl.c +++ b/mojoshader_opengl.c @@ -502,6 +502,7 @@ void MOJOSHADER_glSetVertexAttribute(MOJOSHADER_usage usage, { // !!! FIXME: fails if size==1. pglVertexPointer(size, opengl_posattr_type(type), stride, ptr); + pglEnableClientState(GL_VERTEX_ARRAY); } // if int i; @@ -524,8 +525,9 @@ void MOJOSHADER_glSetVertexAttribute(MOJOSHADER_usage usage, 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