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

32 lines
455 B
Markdown
Raw Normal View History

# D3D12Texture::GetResource
获取 D3D12 资源指针。
```cpp
ID3D12Resource* GetResource() const;
```
## 参数
## 返回值
`ID3D12Resource*` - D3D12 资源指针
**线程安全:** ❌
**复杂度:** O(1)
## 示例
```cpp
D3D12Texture texture;
texture.Initialize(device, desc);
ID3D12Resource* resource = texture.GetResource();
```
## 相关文档
- [D3D12Texture 总览](texture.md)
- [Initialize](initialize.md) - 初始化纹理