The fastest way is proactively, i.e. to have maintained a contiguous array of ID3D11Buff*
before needing to call VSSetConstantBuffers
, for which you'd want a std::vector<ID3D11Buff*>
. You could update the vector
whenever DX11ConstantBuffer::pData
is set, or DX11ConstantBuffer
's destructor runs, and if you want better assurances around that you can make pData
private and have accessor functions which can reliably intercept changes.
If you don't do it proactively, then with your current objects you've no choice but to iterate over the DX11ConstantBuffer
s and copy out the ID3D11Buf*
s to an array/vector one-by-one....