I've been following a Computer Graphics course for a few weeks with an exam coming up, however I've gotten stuck on the topic of index buffers.
I know that a vertex buffer stores all vertices of a mesh. Now suppose we wish to make a cube. This means there are 8 vertices required to construct it. Each vertex is composed of 3 coordinates (x,y,z), thus the vertex buffer will be taking up 3 x 8 = 24 units of space.
I've read that index-buffers store the indices of vertices. So the indices of the vertices of our cube would be 1 to 8. This means 1 triangle takes up 3 units of space.
A question bothering me is: How many units of space would our index-buffer take?
I reason that a cube has 6 faces. Each face is composed of 2 triangles. This means there are 12 triangles, thus the index-buffer would take 3 x 12 = 36 units of space. (I used this site to reach this conclusion: https://msdn.microsoft.com/en-us/library/windows/desktop/bb147325(v=vs.85).aspx). However, my answer sheet claims it is 32.
Normally I wouldn't bother to post on StackOverflow and just ask my teacher, however he is currently on holiday and won't be back until after the exam. Thus, can anyone explain to me how the size of the index-buffer is regulated? (Assume it is the index-buffer used in OpenGL, if that matters).