Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Enable client-side arrays as necessary.
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 27, 2008
1 parent 554d09b commit b7879fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mojoshader_opengl.c
Expand Up @@ -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;
Expand All @@ -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

Expand Down

0 comments on commit b7879fd

Please sign in to comment.