33 lines
473 B
Markdown
33 lines
473 B
Markdown
|
|
# D3D12Texture::GetName
|
||
|
|
|
||
|
|
获取纹理名称。
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
const std::string& GetName() const override;
|
||
|
|
```
|
||
|
|
|
||
|
|
## 参数
|
||
|
|
|
||
|
|
无
|
||
|
|
|
||
|
|
## 返回值
|
||
|
|
|
||
|
|
`const std::string&` - 纹理名称
|
||
|
|
|
||
|
|
**线程安全:** ❌
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
## 示例
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
D3D12Texture texture;
|
||
|
|
texture.Initialize(device, desc);
|
||
|
|
texture.SetName(L"MyTexture");
|
||
|
|
const std::string& name = texture.GetName();
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [D3D12Texture 总览](texture.md)
|
||
|
|
- [SetName](set-name.md) - 设置纹理名称
|