Plasma Engine  2.0
Loading...
Searching...
No Matches
SwapChainDX11.h
1
2#pragma once
3
4#include <RendererDX11/RendererDX11DLL.h>
5#include <RendererFoundation/Descriptors/Descriptors.h>
6#include <RendererFoundation/Device/SwapChain.h>
7
8struct IDXGISwapChain;
9
11{
12public:
13 virtual void AcquireNextRenderTarget(plGALDevice* pDevice) override;
14 virtual void PresentRenderTarget(plGALDevice* pDevice) override;
15 virtual plResult UpdateSwapChain(plGALDevice* pDevice, plEnum<plGALPresentMode> newPresentMode) override;
16
17protected:
18 friend class plGALDeviceDX11;
19 friend class plMemoryUtils;
20
22
23 virtual ~plGALSwapChainDX11();
24
25 virtual plResult InitPlatform(plGALDevice* pDevice) override;
26 plResult CreateBackBufferInternal(plGALDeviceDX11* pDXDevice);
27 void DestroyBackBufferInternal(plGALDeviceDX11* pDXDevice);
28 virtual plResult DeInitPlatform(plGALDevice* pDevice) override;
29
30
31 IDXGISwapChain* m_pDXSwapChain = nullptr;
32
33 plGALTextureHandle m_hBackBufferTexture;
34
35 plEnum<plGALPresentMode> m_CurrentPresentMode;
36 bool m_bCanMakeDirectScreenshots = true;
37 // We can't do screenshots if we're using any of the FLIP swap effects.
38 // If the user requests screenshots anyways, we need to put another buffer in between.
39 // For ease of use, this is m_hBackBufferTexture and the actual "OS backbuffer" is this texture.
40 // In any other case this handle is unused.
41 plGALTextureHandle m_hActualBackBufferTexture;
42};
43
44#include <RendererDX11/Device/Implementation/SwapChainDX11_inl.h>
The DX11 device implementation of the graphics abstraction layer.
Definition DeviceDX11.h:32
The plRenderDevice class is the primary interface for interactions with rendering APIs It contains a ...
Definition Device.h:19
Definition SwapChainDX11.h:11
virtual plResult InitPlatform(plGALDevice *pDevice) override
Definition SwapChainDX11.cpp:99
Definition RendererFoundationDLL.h:411
Definition SwapChain.h:38
This class provides functions to work on raw memory.
Definition MemoryUtils.h:26
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition Descriptors.h:20
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54