How glVertexAttribPointer works? I know that when you call glVertexAttribPointer, you are specifying how the buffer currently binded should take its own data. But if you can have binded one buffer per type (Let's say GL_ARRAY_BUFFER and GL_ELEMENT_ARRAY_BUFFER) then, Are you specifying two buffers simultaneously? In this tutorial says:


  glVertexAttribPointer always refers to whatever buffer is bound to
  GL_ARRAY_BUFFER at the time that this function is called. Therefore it
  does not take a buffer object handle; it simply uses the handle we
  bound previously.


If glVertexAttribPointer refers to the GL_ARRAY_BUFFER buffer currently binded, How I call glVertexAttribPointer for the GL_ELEMENT_ARRAY_BUFFER buffer?
How I call glVertexAttribPointer for the GL_ELEMENT_ARRAY_BUFFER buffer?


You don't. The element array buffer is used to store vertex indices, not vertex attribute data and therefore it doesn't have attribute pointers. The count, size, and offset for index data is specified in the draw call, e.g. glDrawElements.