glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
- glVertexPointer(2, GL_INT, 0, vertices);
- glColorPointer(3, GL_FLOAT, 0, colors);
+ glVertexPointer(2, GL_INT, 2 * sizeof(GLint), vertices);
+ glColorPointer(3, GL_FLOAT, 3 * sizeof(GLfloat), colors);
}
static void setupInterleave(void)
glLoadIdentity()
glOrtho(left = 0, right = 350, bottom = 0, top = 350, zNear = -1, zFar = 1)
glClear(mask = GL_COLOR_BUFFER_BIT)
-glColorPointer(size = 3, type = GL_FLOAT, stride = 0, pointer = blob(72))
-glVertexPointer(size = 2, type = GL_INT, stride = 0, pointer = blob(48))
+glColorPointer(size = 3, type = GL_FLOAT, stride = 12, pointer = blob(72))
+glVertexPointer(size = 2, type = GL_INT, stride = 8, pointer = blob(48))
glDrawArrays(mode = GL_TRIANGLES, first = 0, count = 6)
glFlush()