Files
XCEngine/engine/include/XCEngine/RHI/D3D12/D3D12DepthStencilView.h
ssdfasd 5683b10e65 Rename RHI header files for clarity
- Rename Enums.h to RHIEnums.h
- Rename Types.h to RHITypes.h
- Update all include references in D3D12 headers and test files
2026-03-17 02:39:22 +08:00

34 lines
925 B
C++

#pragma once
#include <d3d12.h>
#include <wrl/client.h>
#include "../RHIEnums.h"
#include "D3D12Enum.h"
using Microsoft::WRL::ComPtr;
namespace XCEngine {
namespace RHI {
class D3D12DepthStencilView {
public:
D3D12DepthStencilView();
~D3D12DepthStencilView();
void Initialize(ID3D12Device* device, ID3D12Resource* resource, const D3D12_DEPTH_STENCIL_VIEW_DESC* desc = nullptr);
void InitializeAt(ID3D12Device* device, ID3D12Resource* resource, D3D12_CPU_DESCRIPTOR_HANDLE handle, const D3D12_DEPTH_STENCIL_VIEW_DESC* desc = nullptr);
void Shutdown();
D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() const { return m_handle; }
static D3D12_DEPTH_STENCIL_VIEW_DESC CreateDesc(Format format, D3D12_DSV_DIMENSION dimension = D3D12_DSV_DIMENSION_TEXTURE2D);
private:
D3D12_CPU_DESCRIPTOR_HANDLE m_handle;
ID3D12Resource* m_resource;
};
} // namespace RHI
} // namespace XCEngine