refactor(docs): D3D12模块文档重构 - 修复链接错误并新增Buffer/Texture/SwapChain方法文档
- 新增32个方法文档(D3D12Buffer 13个,D3D12Texture 12个,D3D12SwapChain 6个) - 修复11处跨模块引用错误(rhi-device.md, rhi-texture.md等路径错误) - 清理d3d12-overview.md移除不存在的类引用 - 修复D3D12Device/D3D12CommandList/D3D12CommandQueue方法列表 - D3D12模块现无broken links
This commit is contained in:
23
docs/api/d3d12/d3d12-texture-initialize-from-data.md
Normal file
23
docs/api/d3d12/d3d12-texture-initialize-from-data.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# D3D12Texture::InitializeFromData
|
||||
|
||||
从数据初始化纹理。
|
||||
|
||||
```cpp
|
||||
bool InitializeFromData(ID3D12Device* device, ID3D12GraphicsCommandList* commandList, const void* pixelData, uint32_t width, uint32_t height, DXGI_FORMAT format, uint32_t rowPitch = 0, ComPtr<ID3D12Resource>* uploadBuffer = nullptr);
|
||||
```
|
||||
|
||||
**参数:**
|
||||
- `device` - DirectX 12 设备指针
|
||||
- `commandList` - 用于上传命令的命令列表
|
||||
- `pixelData` - 像素数据指针
|
||||
- `width` - 纹理宽度
|
||||
- `height` - 纹理高度
|
||||
- `format` - 纹理格式
|
||||
- `rowPitch` - 行pitch(默认为0)
|
||||
- `uploadBuffer` - 可选的上传缓冲区输出指针
|
||||
|
||||
**返回:** `bool` - 初始化成功返回 true,失败返回 false
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Texture 总览](d3d12-texture.md)
|
||||
Reference in New Issue
Block a user