Files
XCEngine/docs/api/rhi/command-list/copy-resource.md
2026-03-20 02:35:45 +08:00

30 lines
591 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RHICommandList::CopyResource
```cpp
virtual void CopyResource(void* dst, void* src) = 0;
```
复制整个资源的内容。源资源和目标资源必须类型相同且大小相等。
**参数:**
- `dst` - 目标资源指针
- `src` - 源资源指针
**返回:** `void`
**异常:**
**线程安全:**
**复杂度:** O(n)n 为资源大小
**示例:**
```cpp
cmdList->CopyResource(dstTexture, srcTexture);
```
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览
- [TransitionBarrier](transition-barrier.md) - 设置资源状态转换