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
8
struct
IDXGISwapChain;
9
10
class
plGALSwapChainDX11
:
public
plGALWindowSwapChain
11
{
12
public
:
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
17
protected
:
18
friend
class
plGALDeviceDX11
;
19
friend
class
plMemoryUtils
;
20
21
plGALSwapChainDX11
(
const
plGALWindowSwapChainCreationDescription
& Description);
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>
plGALDeviceDX11
The DX11 device implementation of the graphics abstraction layer.
Definition
DeviceDX11.h:32
plGALDevice
The plRenderDevice class is the primary interface for interactions with rendering APIs It contains a ...
Definition
Device.h:19
plGALSwapChainDX11
Definition
SwapChainDX11.h:11
plGALSwapChainDX11::InitPlatform
virtual plResult InitPlatform(plGALDevice *pDevice) override
Definition
SwapChainDX11.cpp:99
plGALTextureHandle
Definition
RendererFoundationDLL.h:411
plGALWindowSwapChain
Definition
SwapChain.h:38
plMemoryUtils
This class provides functions to work on raw memory.
Definition
MemoryUtils.h:26
plEnum
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition
Enum.h:37
plGALWindowSwapChainCreationDescription
Definition
Descriptors.h:20
plResult
Default enum for returning failure or success, instead of using a bool.
Definition
Types.h:54
Code
Engine
RendererDX11
Device
SwapChainDX11.h
Generated by
1.11.0