To be able to use index buffers, they must also be bound to a vertex array object along with the vertex buffers. Ideally, if there are multiple index buffers for a vertex buffer, separate VAOs should be created for each combination.