slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
DX12RenderTarget.h
浏览该文件的文档.
1//
2// Created by zhou_zhengming on 2026/5/18.
3//
4
5#pragma once
6
7#include "DX12Common.h"
8#include "d3d12.h"
9
10namespace z8
11{
13{
14 static constexpr int RtvBufCount = 2;
15public:
18 unsigned DptSize = 0;
19 D3D12_CPU_DESCRIPTOR_HANDLE Dpt;
20 DXGI_FORMAT Format = DXGI_FORMAT_R8G8B8A8_UNORM;
21 int CurRtvId = 0;
22
24
25 void InitDescriptor();
26 void InitBuffer();
27 void ClearBuffer() const;
28 void ResetBuffer();
29 void Transition(bool toPresent = true) const;
30 void Swap();
31 void Bind(bool needDepth = true) const;
32 ID3D12Resource* GetBuffer() const;
33};
34
35}
36
static MaterialRegister< MetalMaterial > R
Definition MetalMaterial.cpp:10
Definition DX12Common.h:34
Definition DX12Render.h:30
Definition DX12RenderTarget.h:13
void ClearBuffer() const
Definition DX12RenderTarget.cpp:62
ComPtr< ID3D12DescriptorHeap > DptHeap
Definition DX12RenderTarget.h:17
static constexpr int RtvBufCount
Definition DX12RenderTarget.h:14
void InitBuffer()
Definition DX12RenderTarget.cpp:30
unsigned DptSize
Definition DX12RenderTarget.h:18
D3D12_CPU_DESCRIPTOR_HANDLE Dpt
Definition DX12RenderTarget.h:19
ID3D12Resource * GetBuffer() const
Definition DX12RenderTarget.cpp:72
void InitDescriptor()
Definition DX12RenderTarget.cpp:14
int CurRtvId
Definition DX12RenderTarget.h:21
void Swap()
Definition DX12RenderTarget.cpp:46
void Transition(bool toPresent=true) const
Definition DX12RenderTarget.cpp:76
void ResetBuffer()
Definition DX12RenderTarget.cpp:66
DXGI_FORMAT Format
Definition DX12RenderTarget.h:20
DX12RenderTarget(DX12Render *R)
Definition DX12RenderTarget.h:23
void Bind(bool needDepth=true) const
Definition DX12RenderTarget.cpp:53
Definition Application.h:14
Microsoft::WRL::ComPtr< T > ComPtr
Definition DX12Common.h:31
Definition slang-cpp-types.h:104