Nui Engine
A game engine framework
Loading...
Searching...
No Matches
DepthStencilBuffer.h
1#pragma once
2#include "Graphics/Common.h"
3
4namespace Nui::Graphics
5{
10 {
14 ComPtr<ID3D11Texture2D> Texture;
15
19 ComPtr<ID3D11DepthStencilView> DSView;
20
24 ComPtr<ID3D11DepthStencilView> ReadOnlyDSView;
25
29 ComPtr<ID3D11ShaderResourceView> SRView;
30
34 U32 Width;
35
39 U32 Height;
40
45
50
54 DXGI_FORMAT Format;
55
60
64 std::vector<ComPtr<ID3D11DepthStencilView>> ArraySlices;
65
68
82 ID3D11Device1* device,
83 U32 width,
84 U32 height,
85 DXGI_FORMAT format = DXGI_FORMAT_D24_UNORM_S8_UINT,
86 bool useAsShaderResource = false,
87 U32 multiSamples = 1,
88 U32 msQuality = 0,
89 U32 arraySize = 1);
90 };
91}
Represents a depth stencil buffer.
Definition DepthStencilBuffer.h:10
U32 MultiSamples
The number of multisamples.
Definition DepthStencilBuffer.h:44
ComPtr< ID3D11ShaderResourceView > SRView
The shader resource view.
Definition DepthStencilBuffer.h:29
U32 Width
The width of the depth stencil buffer.
Definition DepthStencilBuffer.h:34
ComPtr< ID3D11Texture2D > Texture
The depth stencil texture.
Definition DepthStencilBuffer.h:14
ComPtr< ID3D11DepthStencilView > ReadOnlyDSView
The read only depth stencil view.
Definition DepthStencilBuffer.h:24
U32 Height
The height of the depth stencil buffer.
Definition DepthStencilBuffer.h:39
U32 ArraySize
The number of array slices.
Definition DepthStencilBuffer.h:59
ComPtr< ID3D11DepthStencilView > DSView
The depth stencil view.
Definition DepthStencilBuffer.h:19
DXGI_FORMAT Format
The format of the depth stencil buffer.
Definition DepthStencilBuffer.h:54
static DepthStencilBuffer Create(ID3D11Device1 *device, U32 width, U32 height, DXGI_FORMAT format=DXGI_FORMAT_D24_UNORM_S8_UINT, bool useAsShaderResource=false, U32 multiSamples=1, U32 msQuality=0, U32 arraySize=1)
Creates a depth stencil buffer.
Definition DepthStencilBuffer.cpp:23
std::vector< ComPtr< ID3D11DepthStencilView > > ArraySlices
The array slices.
Definition DepthStencilBuffer.h:64
U32 MSQuality
The multisample quality of the depth stencil buffer.
Definition DepthStencilBuffer.h:49