![]()  | 
  
    MAGE
    v0.171.0
    
   Matthias Advanced Game Engine 
   | 
 
Public Member Functions | |
| Impl (ID3D11Device &device, ID3D11DeviceContext &device_context, NotNull< HWND > window, DisplayConfiguration &display_configuration) | |
| Impl (const Impl &swap_chain)=delete | |
| Impl (Impl &&swap_chain) noexcept | |
| ~Impl () | |
| Impl & | operator= (const Impl &swap_chain)=delete | 
| Impl & | operator= (Impl &&swap_chain)=delete | 
| NotNull< HWND > | GetWindow () noexcept | 
| bool | IsWindowed () const noexcept | 
| bool | IsFullScreen () const noexcept | 
| bool | LostMode () const noexcept | 
| void | SetInitialMode () | 
| void | SwitchMode (bool toggle) | 
| ID3D11RenderTargetView & | GetRTV () const noexcept | 
| void | Clear () const noexcept | 
| void | Present () const noexcept | 
| void | TakeScreenShot (const std::wstring &fname) const | 
Private Member Functions | |
| bool | IsTrackedFullScreen () const noexcept | 
| void | SetTrackedFullScreen (bool fullscreen) noexcept | 
| void | SetupSwapChain () | 
| void | ResetSwapChain () | 
| void | CreateSwapChain () | 
| void | CreateRTV () | 
Private Attributes | |
| NotNull< HWND > | m_window | 
| DisplayConfiguration & | m_display_configuration | 
| ID3D11Device & | m_device | 
| ID3D11DeviceContext & | m_device_context | 
| ComPtr< DXGISwapChain > | m_swap_chain | 
| ComPtr< ID3D11RenderTargetView > | m_rtv | 
A class of swap chains.
      
  | 
  explicit | 
Constructs a swap chain.
| [in,out] | device | A reference to the device. | 
| [in,out] | device_context | A reference to the device context. | 
| [in] | window | The main window handle. | 
| [in,out] | display_configuration | A reference to the display configuration. | 
      
  | 
  delete | 
Constructs a swap chain from the given swap chain.
| [in] | swap_chain | A reference to a swap chain to copy. | 
      
  | 
  defaultnoexcept | 
Constructs a swap chain by moving the given swap chain.
| [in] | swap_chain | A reference to a swap chain to move. | 
| mage::rendering::SwapChain::Impl::~Impl | ( | ) | 
Destructs this swap chain.
      
  | 
  noexcept | 
Clears the render target view of the back buffer of this swap chain.
      
  | 
  private | 
      
  | 
  private | 
Creates the swap chain.
| Exception | Failed to create the swap chain. | 
      
  | 
  noexcept | 
Returns the render target view of the back buffer of this swap chain.
      
  | 
  noexcept | 
Returns the window handle of this swap chain.
      
  | 
  noexcept | 
Checks whether this swap chain displays in full screen mode.
true if this swap chain displays in full screen mode. false otherwise. 
      
  | 
  privatenoexcept | 
Checks whether the tracked mode of this swap chain corresponds to fullscreen mode.
true if the tracked mode of this swap chain corresponds to fullscreen mode. false otherwise. 
      
  | 
  noexcept | 
Checks whether this swap chain displays in windowed mode.
true if this swap chain displays in windowed mode. false otherwise. 
      
  | 
  noexcept | 
Checks whether this swap chain lost its mode, i.e. the tracked mode of this swap chain differs from its actual mode (e.g. ALT + TAB).
true if this swap chain lost its mode. false otherwise. Copies the given swap chain to this swap chain.
| [in] | swap_chain | A reference to a swap chain to copy. | 
Moves the given swap chain to this swap chain.
| [in] | swap_chain | A reference to a swap chain to move. | 
      
  | 
  noexcept | 
Presents the back buffer of this swap chain.
      
  | 
  private | 
Resets the swap chain.
| Exception | Failed to reset up the swap chain. | 
| void mage::rendering::SwapChain::Impl::SetInitialMode | ( | ) | 
Sets the initial mode of this swap chain.
Call this method before starting the game loop.
| Exception | Failed to reset up the swap chain. | 
      
  | 
  privatenoexcept | 
Sets the tracked mode of this swap chain.
| [in] | fullscreen | true if the tracked mode corresponds to fullscreen mode. false otherwise.  | 
      
  | 
  private | 
Sets up the swap chain.
| Exception | Failed to set up the swap chain. | 
| void mage::rendering::SwapChain::Impl::SwitchMode | ( | bool | toggle | ) | 
Recreates the swap chain buffers and switches the mode of this swap chain. Windowed mode is switched to full screen mode and vice versa.
| [in] | toggle | If true, then only the swap chain buffers will be recreated to match the current mode of this swap chain and no mode switch will occurs. If false, then the swap chain buffers will be recreated and a mode switch will occur.  | 
| Exception | Failed to reset up the swap chain. | 
| void mage::rendering::SwapChain::Impl::TakeScreenShot | ( | const std::wstring & | fname | ) | const | 
Takes a screenshot of the current back buffer of this swap chain.
| [in] | fname | A reference to the filename. | 
| Exception | Failed to take a screenshot of the current back buffer of this swap chain. | 
      
  | 
  private | 
A reference to the device.
      
  | 
  private | 
A reference to the device context.
      
  | 
  private | 
A reference to the display configuration of this swap chain.
      
  | 
  private | 
A pointer to the render target view of the back buffer of this swap chain.
      
  | 
  private | 
A pointer to the swap chain.
      
  | 
  private | 
The handle of the parent window of this swap chain.