Files
XCEngine/docs/api/rhi/d3d12/texture/owns-resource.md

33 lines
474 B
Markdown
Raw Normal View History

# D3D12Texture::OwnsResource
检查是否拥有资源所有权。
```cpp
bool OwnsResource() const;
```
## 参数
## 返回值
`bool` - 如果拥有资源所有权返回 true否则返回 false
**线程安全:** ❌
**复杂度:** O(1)
## 示例
```cpp
D3D12Texture texture;
texture.Initialize(device, desc);
if (texture.OwnsResource()) {
// 纹理拥有资源所有权,需要负责释放
}
```
## 相关文档
- [D3D12Texture 总览](texture.md)