In OpenGL ES (or in my case, WebGL), I don't see how binding vertex and color buffers back to back and then calling drawArrays works. For instance, here is some example code for you to get the idea:
vertexBuffer = glCreateBuffer();
glBindBuffer(GL_ARRAY_BUFFER, vertextBuffer);
glBufferData(GL_ARRAY_BUFFER, vertices, GL_STATIC_DRAW);
colorBuffer = glCreateBuffer();
glBindBuffer(GL_ARRAY_BUFFER, colorBuffer);
glBufferData(GL_ARRAY_BUFFER, colors, GL_STATIC_DRAW);
glDrawArrays(GL_TRIANGLES, 0, numberOfVertices);
If I bind GL_ARRAY_BUFFER to first the vertices, bufferData, and then go and bind some colors, what is going on behind the scenes there? It somehow seems to me like the vertex information should be ignored because I bound color information to GL_ARRAY_BUFFER right after it.