.. _program_listing_file_Source_Azura_RenderSystem_Src_D3D12_D3D12ScopedSwapChain.cpp: Program Listing for File D3D12ScopedSwapChain.cpp ================================================= |exhale_lsh| :ref:`Return to documentation for file ` (``Source\Azura\RenderSystem\Src\D3D12\D3D12ScopedSwapChain.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include "D3D12/D3D12ScopedSwapChain.h" #include "D3D12/D3D12Macros.h" #include "Log/Log.h" #include "D3D12/d3dx12.h" namespace Azura { namespace D3D12 { void D3D12ScopedSwapChain::Create( const Microsoft::WRL::ComPtr& factory, const Microsoft::WRL::ComPtr& commandQueue, const Window& windowHandle, const SwapChainRequirements& swapChainRequirements, const Log& log_D3D12RenderSystem) { m_format = swapChainRequirements.m_format; m_depthFormat = swapChainRequirements.m_depthFormat; auto swapChain = D3D12Core::CreateSwapChain(factory, commandQueue, windowHandle.GetHandle(), swapChainRequirements, log_D3D12RenderSystem); VERIFY_D3D_OP(log_D3D12RenderSystem, swapChain.As(&m_swapChain), "Swapchain typecast failed"); } const Microsoft::WRL::ComPtr& D3D12ScopedSwapChain::RealComPtr() const { return m_swapChain; } IDXGISwapChain3* D3D12ScopedSwapChain::Real() const { return m_swapChain.Get(); } RawStorageFormat D3D12ScopedSwapChain::GetFormat() const { return m_format; } RawStorageFormat D3D12ScopedSwapChain::GetDepthFormat() const { return m_depthFormat; } } // namespace D3D12 } // namespace Azura