26 lines
372 B
Markdown
26 lines
372 B
Markdown
# RHITexture::GetDepth
|
||
|
||
```cpp
|
||
virtual uint32_t GetDepth() const = 0;
|
||
```
|
||
|
||
获取纹理深度(3D 纹理)。
|
||
|
||
**参数:** 无
|
||
|
||
**返回:** 纹理深度。对于 1D/2D 纹理返回 1
|
||
|
||
**线程安全:** ✅
|
||
|
||
**复杂度:** O(1)
|
||
|
||
**示例:**
|
||
|
||
```cpp
|
||
uint32_t depth = texture->GetDepth();
|
||
```
|
||
|
||
## 相关文档
|
||
|
||
- [RHITexture 总览](texture.md) - 返回类总览
|