void ColorBuffer::CreateFromSwapChain( const std::wstring& Name, ID3D12Resource* BaseResource ) { AssociateWithResource( Graphics::g_device.Get(), Name, BaseResource, D3D12_RESOURCE_STATE_PRESENT ); if (m_RTVHandle.ptr == ~0ull) m_RTVHandle = Graphics::g_pRTVDescriptorHeap->Append().GetCPUHandle(); Graphics::g_device->CreateRenderTargetView( m_pResource.Get(), nullptr, m_RTVHandle ); }
void ColorBuffer::CreateFromSwapChain( const std::wstring& Name, ID3D12Resource* BaseResource ) { AssociateWithResource(Graphics::g_Device, Name, BaseResource, D3D12_RESOURCE_STATE_PRESENT); //m_UAVHandle[0] = Graphics::AllocateDescriptor(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); //Graphics::g_Device->CreateUnorderedAccessView(m_pResource.Get(), nullptr, nullptr, m_UAVHandle[0]); m_RTVHandle = Graphics::AllocateDescriptor(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); Graphics::g_Device->CreateRenderTargetView(m_pResource.Get(), nullptr, m_RTVHandle); }