Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

If I want to create an ID3D11ShaderResourceView* to a buffer with a given DXGI_FORMAT (e.g. DXGI_FORMAT_R32G32B32), do I have to also supply a value for D3D11_SHADER_RESOURCE_VIEW_DESC.Buffer.ElementWidth?

The MSDN page says:

This can be determined from the format stored in the shader-resource-view description.

...But then, what's the point of D3D11_SHADER_RESOURCE_VIEW_DESC.Buffer.ElementWidth? When we use a structured buffer you don't specify it; so when would you ever use it?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.