>+ for(i = 0; i < 16 /* Max vertex attribs */; i++) { I think you should be using MAX_ATTRIBS there. Changing the strided data like that in drawPrimitive looks rather hacky to me.