In the samples I have looked at so far some of the commands are something like:
- D3D12_DESCRIPTOR_HEAP_DESC with D3D12_DESCRIPTOR_HEAP_TYPE::D3D12_DESCRIPTOR_HEAP_TYPE_RTV
- ID3D12Device::CreateDescriptorHeap
- D3D12_CPU_DESCRIPTOR_HANDLE with ID3D12DescriptorHeap::GetCPUDescriptorHandleForHeapStart (and maybe ID3D12Device::GetDescriptorHandleIncrementSize)
- (Optional?) ID3D12Device::CreateRenderTargetView
- (Optional?) IDXGISwapChain3::GetBuffer
- Schedule rendering stuff to a command list, of note OMSetRenderTargets and DrawInstanced, and then close the command list.
- ID3D12CommandQueue::ExecuteCommandLists
- (Optional?) IDXGISwapChain3::Present
- Schedule a signal with ID3D12CommandQueue::Signal on a fence
- Wait for the GPU to finish with ID3D12Fence::SetEventOnCompletion and WaitForSingleObjectEx
If possible, how can step 4.1 be replaced with a buffer of choice? I.e. how can one create a ID3D12Resource* and render to it, and then read from it into say a std::vector? (I assume if this is possible that step 6.1 can be ignored, since there is no render target view for the swap chain to present to. Perhaps step 4 is unnecessary as well in this case ? Maybe only OMSetRenderTargets matters ?)