Skip to main content
[Edit removed during grace period]
Link
NPS
  • 2.3k
  • 5
  • 28
  • 51
Tweeted twitter.com/#!/StackGameDev/status/371378042146652160
Source Link
NPS
  • 2.3k
  • 5
  • 28
  • 51

One index buffer with multiple vertex buffers?

I noticed that there's IASetVertexBuffers() to set multiple vertex buffers at once but there's only IASetIndexBuffer() to set one index buffer. So I assume that I can simultaneously only have one index buffer set but I can have multiple vertex buffers set at the same time.

  1. Is that correct?
  2. How do I use index buffer with multiple vertex buffers? I.e. what indices do I provide to use more than one vertex buffer and how do I know what buffer conrete indices refer to?

Or is this used only in the case when instead of interleaved vertex data: (Pos, Normal, Pos, Normal, Pos, Normal) I provide the data in multiple buffers: (Pos, Pos, Pos) (Normal, Normal, Normal) and conrete indices refer to the same vertices in each buffer?