docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录 - 重命名 index.md 为 main.md - 修正所有模块文档中的错误: - math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式 - containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节 - core: 修复 types 链接错误 - debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI - memory: 修复头文件路径, malloc vs operator new, 新增方法文档 - resources: 修复 Shader/Texture 链接错误 - threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接 - 验证: fix_links.py 确认 0 个断裂引用
This commit is contained in:
201
docs/api/rhi/command-list/methods.md
Normal file
201
docs/api/rhi/command-list/methods.md
Normal file
@@ -0,0 +1,201 @@
|
||||
# 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;
|
||||
```
|
||||
|
||||
释放命令列表资源。
|
||||
Reference in New Issue
Block a user