36 lines
789 B
Markdown
36 lines
789 B
Markdown
|
|
# D3D12RenderTargetView::Initialize
|
||
|
|
|
||
|
|
## 函数签名
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
void Initialize(ID3D12Device* device, ID3D12Resource* resource, const D3D12_RENDER_TARGET_VIEW_DESC* desc = nullptr)
|
||
|
|
```
|
||
|
|
|
||
|
|
## 描述
|
||
|
|
|
||
|
|
初始化渲染目标视图。内部自动分配描述符句柄。
|
||
|
|
|
||
|
|
## 参数
|
||
|
|
|
||
|
|
| 参数 | 类型 | 描述 |
|
||
|
|
|------|------|------|
|
||
|
|
| `device` | `ID3D12Device*` | D3D12 设备指针 |
|
||
|
|
| `resource` | `ID3D12Resource*` | 渲染目标资源指针 |
|
||
|
|
| `desc` | `D3D12_RENDER_TARGET_VIEW_DESC*` | 视图描述符(可选) |
|
||
|
|
|
||
|
|
## 返回值
|
||
|
|
|
||
|
|
无
|
||
|
|
|
||
|
|
## 示例
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
D3D12RenderTargetView rtv;
|
||
|
|
rtv.Initialize(device, resource, &desc);
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [D3D12RenderTargetView](render-target-view.md) - 类总览
|
||
|
|
- [D3D12RenderTargetView::InitializeAt](initialize-at.md) - 在指定位置初始化
|