How do you read vertex / index buffers?

Basically, my question is: how do you read vertex / index buffers in DirectX 12? I'm probably looking for something that is equivalent to the DirectX 11 card feature, which I understand now you need to do manually. I tried to find the answer, but did not find anything. There are not many examples of DirectX 12 / tutorials, as this is fairly new.

+4
source share
1 answer

Create another buffer resource with the heap type set to D3D12_HEAP_TYPE_READBACK. Copy the vertex buffer / index to the new resource using ID3D12GraphicsCommandList::CopyBufferRegionor UpdateSubresources. When the copy operation is complete, call ID3D12Resource::Mapto see the results.

.

+2

Source: https://habr.com/ru/post/1621631/


All Articles