- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
40 lines
947 B
Markdown
40 lines
947 B
Markdown
# D3D12ShaderResourceView::InitializeAt
|
|
|
|
## 函数签名
|
|
|
|
```cpp
|
|
void InitializeAt(ID3D12Device* device, ID3D12Resource* resource, D3D12_CPU_DESCRIPTOR_HANDLE handle, const D3D12_SHADER_RESOURCE_VIEW_DESC* desc = nullptr)
|
|
```
|
|
|
|
## 中文描述
|
|
|
|
在指定描述符句柄位置初始化着色器资源视图,用于外部描述符堆管理场景。
|
|
|
|
## 参数
|
|
|
|
| 参数 | 类型 | 描述 |
|
|
|------|------|------|
|
|
| `device` | `ID3D12Device*` | D3D12 设备指针 |
|
|
| `resource` | `ID3D12Resource*` | 资源指针 |
|
|
| `handle` | `D3D12_CPU_DESCRIPTOR_HANDLE` | 预分配的描述符句柄 |
|
|
| `desc` | `D3D12_SHADER_RESOURCE_VIEW_DESC*` | 视图描述符(可选) |
|
|
|
|
## 返回值
|
|
|
|
无
|
|
|
|
## 复杂度
|
|
|
|
O(1)
|
|
|
|
## 示例
|
|
|
|
```cpp
|
|
D3D12_CPU_DESCRIPTOR_HANDLE handle = descriptorHeap->GetCPUDescriptorHandleForHeapStart();
|
|
srv->InitializeAt(device, resource, handle);
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [D3D12ShaderResourceView](shader-resource-view.md) - 类总览
|