why does binding a GL_ELEMENT_ARRAY_BUFFER to 0 produce a memmove error?
问题 I had a bug that took me quite some time to fix. I kept getting EXC_BAD_ACCESS and a reference to a memmove error without any further description until I commented the following line: [self loadShaders]; glGenVertexArraysOES(1, &_vao); glBindVertexArrayOES(_vao); // Vertex Buffer glGenBuffers(1, &_vertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertices), Vertices, GL_STATIC_DRAW); glEnableVertexAttribArray(ATTRIB_VERTEX);