LqdOunce
LqdOunce

Reputation: 55

(DirectX 11) Can a single vertex buffer be bound to more than one IA input slot at a time?

If I have different data types (position, normal and color, for example) that are not interleaved but are stored in the same vertex buffer, could I bind that buffer to more than one input slot in the IA stage to point to all 3 of these data areas simultaneously?

Upvotes: 3

Views: 556

Answers (1)

mrvux
mrvux

Reputation: 8963

Yes this is totally allowed.

When you call IaSetVertexBuffers

you can provide the pOffsets parameter, which is the starting location within your buffer.

So it is possible to assign the same buffer in different slots with a different start location.

Upvotes: 3

Related Questions