202 lines
3.2 KiB
Markdown
202 lines
3.2 KiB
Markdown
|
|
# RHICommandList 方法
|
||
|
|
|
||
|
|
## Reset
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void Reset() = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
重置命令列表,开始新的录制。
|
||
|
|
|
||
|
|
## Close
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void Close() = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
关闭命令列表,结束录制。
|
||
|
|
|
||
|
|
## TransitionBarrier
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void TransitionBarrier(void* resource, ResourceStates stateBefore, ResourceStates stateAfter) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
资源状态转换屏障。
|
||
|
|
|
||
|
|
## SetPipelineState
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetPipelineState(void* pso) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置管线状态对象。
|
||
|
|
|
||
|
|
## SetPrimitiveTopology
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetPrimitiveTopology(PrimitiveTopology topology) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置图元拓扑。
|
||
|
|
|
||
|
|
## SetViewport
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetViewport(const Viewport& viewport) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置视口。
|
||
|
|
|
||
|
|
## SetViewports
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetViewports(uint32_t count, const Viewport* viewports) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置多个视口。
|
||
|
|
|
||
|
|
## SetScissorRect
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetScissorRect(const Rect& rect) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置裁剪矩形。
|
||
|
|
|
||
|
|
## SetScissorRects
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetScissorRects(uint32_t count, const Rect* rects) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置多个裁剪矩形。
|
||
|
|
|
||
|
|
## SetRenderTargets
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetRenderTargets(uint32_t count, void** renderTargets, void* depthStencil = nullptr) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置渲染目标。
|
||
|
|
|
||
|
|
## SetDepthStencilState
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetDepthStencilState(const DepthStencilState& state) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置深度模板状态。
|
||
|
|
|
||
|
|
## SetStencilRef
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetStencilRef(uint8_t ref) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置模板参考值。
|
||
|
|
|
||
|
|
## SetBlendState
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetBlendState(const BlendState& state) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置混合状态。
|
||
|
|
|
||
|
|
## SetBlendFactor
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetBlendFactor(const float factor[4]) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置混合因子。
|
||
|
|
|
||
|
|
## SetVertexBuffer
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetVertexBuffer(uint32_t slot, void* buffer, uint64_t offset, uint32_t stride) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置顶点缓冲。
|
||
|
|
|
||
|
|
## SetVertexBuffers
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetVertexBuffers(uint32_t startSlot, uint32_t count, const uint64_t* buffers, const uint64_t* offsets, const uint32_t* strides) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置多个顶点缓冲。
|
||
|
|
|
||
|
|
## SetIndexBuffer
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void SetIndexBuffer(void* buffer, uint64_t offset, Format format) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
设置索引缓冲。
|
||
|
|
|
||
|
|
## Draw
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t startVertex = 0, uint32_t startInstance = 0) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
绘制调用。
|
||
|
|
|
||
|
|
## DrawIndexed
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t startIndex = 0, int32_t baseVertex = 0, uint32_t startInstance = 0) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
索引绘制调用。
|
||
|
|
|
||
|
|
## Clear
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void Clear(float r, float g, float b, float a, uint32_t buffers) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
清除缓冲。
|
||
|
|
|
||
|
|
## ClearRenderTarget
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void ClearRenderTarget(void* renderTarget, const float color[4]) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
清除渲染目标。
|
||
|
|
|
||
|
|
## ClearDepthStencil
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void ClearDepthStencil(void* depthStencil, float depth, uint8_t stencil) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
清除深度模板。
|
||
|
|
|
||
|
|
## CopyResource
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void CopyResource(void* dst, void* src) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
复制资源。
|
||
|
|
|
||
|
|
## Dispatch
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void Dispatch(uint32_t x, uint32_t y, uint32_t z) = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
分发计算着色器。
|
||
|
|
|
||
|
|
## Shutdown
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual void Shutdown() = 0;
|
||
|
|
```
|
||
|
|
|
||
|
|
释放命令列表资源。
|