docs: update RHI API docs
This commit is contained in:
32
docs/api/rhi/d3d12/texture/get-size.md
Normal file
32
docs/api/rhi/d3d12/texture/get-size.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# D3D12Texture::GetSize
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
size_t GetSize() const
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
计算并返回纹理的总大小(字节)。计算方式为 `宽度 × 高度 × 深度或数组大小`。
|
||||
|
||||
## 返回值
|
||||
|
||||
`size_t` - 纹理大小(字节)
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
size_t size = texture->GetSize();
|
||||
printf("Texture size: %zu bytes\n", size);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Texture](texture.md) - 类总览
|
||||
- [GetWidth](../../texture/get-width.md) - 获取纹理宽度
|
||||
- [GetHeight](../../texture/get-height.md) - 获取纹理高度
|
||||
Reference in New Issue
Block a user