Files
XCEngine/docs/api/rhi/d3d12/texture/get-depth.md

33 lines
537 B
Markdown
Raw Normal View History

# D3D12Texture::GetDepth
获取纹理深度或数组大小。
```cpp
uint32_t GetDepth() const override;
```
## 参数
## 返回值
`uint32_t` - 纹理深度3D 纹理或数组大小1D/2D 纹理数组)
**线程安全:** ❌
**复杂度:** O(1)
## 示例
```cpp
D3D12Texture texture;
texture.Initialize(device, desc);
uint32_t depth = texture.GetDepth();
```
## 相关文档
- [D3D12Texture 总览](texture.md)
- [GetWidth](get-width.md) - 获取纹理宽度
- [GetHeight](get-height.md) - 获取纹理高度