Your OpenGL code looks correct. Does calling glDrawArrays bad access or bad access to it? I just can imagine that the glDrawArrays func pointer is not initialized, vertex arrays should be accessible.
You can call this function after glEnableClientState(GL_COLOR_ARRAY); as a test to reset any other obsolete array pointers that might cause bad access:
///@brief Emulation of call glClientAttribDefaultEXT(GL_CLIENT_VERTEX_ARRAY_BIT) according to GL_EXT_direct_state_access. static void ClientAttribDefaultVertexArray(void) { int i; GLint max; glBindBufferARB(GL_ARRAY_BUFFER, 0); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER, 0); glDisableClientState(GL_EDGE_FLAG_ARRAY); glEdgeFlagPointer(0, 0); glDisableClientState(GL_INDEX_ARRAY); glIndexPointer(GL_FLOAT, 0, 0); glDisableClientState(GL_SECONDARY_COLOR_ARRAY); glSecondaryColorPointer(4, GL_FLOAT, 0, 0); glDisableClientState(GL_FOG_COORD_ARRAY); glFogCoordPointer(GL_FLOAT, 0, 0); glGetIntegerv(GL_MAX_TEXTURE_COORDS, &max); for (i = 0; i < max; ++i) { glClientActiveTextureARB(GL_TEXTURE0 + i); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(4, GL_FLOAT, 0, 0); } glDisableClientState(GL_COLOR_ARRAY); glColorPointer(4, GL_FLOAT, 0, 0); glDisableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT, 0, 0); glDisableClientState(GL_VERTEX_ARRAY); glVertexPointer(4, GL_FLOAT, 0, 0); glDisableClientState(GL_WEIGHT_ARRAY_ARB); glWeightPointerARB(0, GL_FLOAT, 0, 0); glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max); for (i = 0; i < max; ++i) { glDisableVertexAttribArrayARB(i); glVertexAttribPointerARB(i, 4, GL_FLOAT, GL_FALSE, 0, 0); } glClientActiveTextureARB(GL_TEXTURE0); }
In addition, you can click and display the state of the vertex array in the client attribute stack:
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);