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

33 lines
480 B
Markdown
Raw Normal View History

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