Files
XCSDD/docs/api/rhi/command-list/command-list.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

2.2 KiB

RHICommandList

命名空间: XCEngine::RHI

类型: class (abstract)

描述: GPU 命令列表抽象接口,用于录制和执行 GPU 命令。

公共方法

方法 描述
Reset 重置命令列表
Close 关闭命令列表
TransitionBarrier 资源状态转换
SetPipelineState 设置管线状态
SetPrimitiveTopology 设置图元拓扑
SetViewport 设置视口
SetViewports 设置多个视口
SetScissorRect 设置裁剪矩形
SetScissorRects 设置多个裁剪矩形
SetRenderTargets 设置渲染目标
SetDepthStencilState 设置深度模板状态
SetStencilRef 设置模板引用值
SetBlendState 设置混合状态
SetBlendFactor 设置混合因子
SetVertexBuffer 设置顶点缓冲
SetVertexBuffers 设置多个顶点缓冲
SetIndexBuffer 设置索引缓冲
Draw 绘制
DrawIndexed 索引绘制
Clear 清除
ClearRenderTarget 清除渲染目标
ClearDepthStencil 清除深度模板
CopyResource 复制资源
Dispatch 分发计算任务
Shutdown 关闭并释放资源

使用示例

commandList->Reset();
commandList->SetPipelineState(pipelineState);
commandList->SetPrimitiveTopology(PrimitiveTopology::TriangleList);
commandList->SetViewport(viewport);
commandList->SetRenderTargets(1, &renderTarget, depthStencil);
commandList->DrawIndexed(indexCount, 1, 0, 0, 0);
commandList->Close();
commandQueue->ExecuteCommandLists(1, (void**)&commandList);

相关文档