From 4a12e26860ac3ffa3d6ec366d2732cf786f25fbc Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Sat, 28 Mar 2026 02:28:46 +0800 Subject: [PATCH] docs(api): fill OpenGL command list passthrough docs --- .../OpenGL/OpenGLCommandList/BeginQuery.md | 30 ++++------- .../OpenGLCommandList/BindBufferBase.md | 26 +++------ .../OpenGLCommandList/BindBufferRange.md | 33 ++++-------- .../OpenGLCommandList/BindFragDataLocation.md | 30 ++++------- .../BindFragDataLocationIndexed.md | 27 +++------- .../OpenGLCommandList/BindImageTexture.md | 35 ++++-------- .../OpenGL/OpenGLCommandList/BindSampler.md | 25 +++------ .../OpenGL/OpenGLCommandList/BindSamplers.md | 26 +++------ .../OpenGL/OpenGLCommandList/BindTexture.md | 32 +++++------ .../OpenGL/OpenGLCommandList/BindTextures.md | 26 +++------ .../OpenGLCommandList/BindVertexArray.md | 53 +++++++------------ .../OpenGLCommandList/BlitFramebuffer.md | 37 ++++--------- .../RHI/OpenGL/OpenGLCommandList/Close.md | 26 ++++----- .../OpenGLCommandList/CopyImageSubData.md | 38 +++---------- .../RHI/OpenGL/OpenGLCommandList/Disable.md | 25 +++------ .../RHI/OpenGL/OpenGLCommandList/Disablei.md | 26 +++------ .../OpenGLCommandList/DispatchCompute.md | 31 ++++------- .../OpenGLCommandList/DispatchIndirect.md | 29 ++++------ .../OpenGLCommandList/DrawIndexedIndirect.md | 35 +++++------- .../OpenGLCommandList/DrawIndexedInstanced.md | 35 +++++------- .../OpenGL/OpenGLCommandList/DrawIndirect.md | 33 ++++-------- .../OpenGL/OpenGLCommandList/DrawInstanced.md | 31 ++++------- .../RHI/OpenGL/OpenGLCommandList/Enable.md | 25 +++------ .../OpenGLCommandList/EnableBlending.md | 28 +++------- .../OpenGL/OpenGLCommandList/EnableCulling.md | 28 +++------- .../OpenGLCommandList/EnableDepthTest.md | 28 +++------- .../OpenGLCommandList/EnableDepthWrite.md | 28 ++++------ .../OpenGLCommandList/EnableScissorTest.md | 28 +++------- .../OpenGLCommandList/EnableStencilTest.md | 28 +++------- .../RHI/OpenGL/OpenGLCommandList/Enablei.md | 26 +++------ .../RHI/OpenGL/OpenGLCommandList/EndQuery.md | 24 +++------ .../OpenGL/OpenGLCommandList/EndRenderPass.md | 29 +++++----- .../InvalidateFramebuffer.md | 26 +++------ .../InvalidateSubFramebuffer.md | 30 +++-------- .../OpenGL/OpenGLCommandList/MemoryBarrier.md | 30 +++++------ .../OpenGLCommandList/MultiDrawArrays.md | 30 +++-------- .../OpenGLCommandList/MultiDrawElements.md | 31 ++++------- .../OpenGL/OpenGLCommandList/PopDebugGroup.md | 23 +++----- .../OpenGLCommandList/PushDebugGroup.md | 27 +++------- .../OpenGL/OpenGLCommandList/ReadPixels.md | 34 ++++-------- .../RHI/OpenGL/OpenGLCommandList/Reset.md | 38 +++++++------ .../OpenGLCommandList/TextureBarrier.md | 23 +++----- .../OpenGL/OpenGLCommandList/UseProgram.md | 28 ++++------ .../RHI/OpenGL/OpenGLCommandList/UseShader.md | 28 +++------- .../OpenGL/OpenGLDevice/MakeContextCurrent.md | 36 +++++++------ docs/api/_meta/rebuild-status.md | 2 +- 46 files changed, 423 insertions(+), 924 deletions(-) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BeginQuery.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BeginQuery.md index 4be2c1e2..0402bb54 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BeginQuery.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BeginQuery.md @@ -1,32 +1,24 @@ -# OpenGLCommandList::BeginQuery - -公开方法,详见头文件声明。 +# OpenGLCommandList::BeginQuery() ```cpp void BeginQuery(unsigned int target, unsigned int id); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 -- `id` - 参数语义详见头文件声明。 +开始一次 OpenGL query。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BeginQuery(...)。 - (void)object; -} +glBeginQuery(target, id); ``` +## 需要注意 + +- 这是原生直通包装,不检查 query 是否已开始。 +- `target` 和 `id` 的合法性完全由调用方负责。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [EndQuery](EndQuery.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferBase.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferBase.md index 1151d75a..e4e4f4fe 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferBase.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferBase.md @@ -1,33 +1,19 @@ -# OpenGLCommandList::BindBufferBase - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindBufferBase() ```cpp void BindBufferBase(unsigned int target, unsigned int index, unsigned int buffer); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 -- `index` - 参数语义详见头文件声明。 -- `buffer` - 参数语义详见头文件声明。 +把 buffer 绑定到某个 indexed target。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindBufferBase(...)。 - (void)object; -} +glBindBufferBase(target, index, buffer); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindBufferRange](BindBufferRange.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferRange.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferRange.md index 04182f40..f04ccf17 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferRange.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindBufferRange.md @@ -1,35 +1,24 @@ -# OpenGLCommandList::BindBufferRange - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindBufferRange() ```cpp void BindBufferRange(unsigned int target, unsigned int index, unsigned int buffer, size_t offset, size_t size); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 -- `index` - 参数语义详见头文件声明。 -- `buffer` - 参数语义详见头文件声明。 -- `offset` - 参数语义详见头文件声明。 -- `size` - 参数语义详见头文件声明。 +把 buffer 的一个范围绑定到 indexed target。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindBufferRange(...)。 - (void)object; -} +glBindBufferRange(target, index, buffer, offset, size); ``` +## 需要注意 + +- 不做对齐或越界检查。 +- `offset` / `size` 的合法性完全依赖调用方。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindBufferBase](BindBufferBase.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocation.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocation.md index afa7899b..5faf98d8 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocation.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocation.md @@ -1,33 +1,23 @@ -# OpenGLCommandList::BindFragDataLocation - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindFragDataLocation() ```cpp void BindFragDataLocation(unsigned int program, unsigned int colorNumber, const char* name); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `program` - 参数语义详见头文件声明。 -- `colorNumber` - 参数语义详见头文件声明。 -- `name` - 参数语义详见头文件声明。 +为片元着色器输出变量指定颜色附件位置。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindFragDataLocation(...)。 - (void)object; -} +glBindFragDataLocation(program, colorNumber, name); ``` +## 需要注意 + +按照 OpenGL 规范,这类绑定通常应在 program link 之前设置。当前封装不检查 program 当前状态。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindFragDataLocationIndexed](BindFragDataLocationIndexed.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocationIndexed.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocationIndexed.md index 2e292d77..365760d6 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocationIndexed.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindFragDataLocationIndexed.md @@ -1,34 +1,19 @@ -# OpenGLCommandList::BindFragDataLocationIndexed - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindFragDataLocationIndexed() ```cpp void BindFragDataLocationIndexed(unsigned int program, unsigned int colorNumber, unsigned int index, const char* name); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `program` - 参数语义详见头文件声明。 -- `colorNumber` - 参数语义详见头文件声明。 -- `index` - 参数语义详见头文件声明。 -- `name` - 参数语义详见头文件声明。 +为片元输出指定颜色编号和 dual-source 索引。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindFragDataLocationIndexed(...)。 - (void)object; -} +glBindFragDataLocationIndexed(program, colorNumber, index, name); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindFragDataLocation](BindFragDataLocation.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindImageTexture.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindImageTexture.md index 63de9532..cc2d2459 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindImageTexture.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindImageTexture.md @@ -1,37 +1,24 @@ -# OpenGLCommandList::BindImageTexture - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindImageTexture() ```cpp void BindImageTexture(unsigned int unit, unsigned int texture, int level, bool layered, int layer, unsigned int access, unsigned int format); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `unit` - 参数语义详见头文件声明。 -- `texture` - 参数语义详见头文件声明。 -- `level` - 参数语义详见头文件声明。 -- `layered` - 参数语义详见头文件声明。 -- `layer` - 参数语义详见头文件声明。 -- `access` - 参数语义详见头文件声明。 -- `format` - 参数语义详见头文件声明。 +把纹理作为 image 绑定到指定 image unit。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindImageTexture(...)。 - (void)object; -} +glBindImageTexture(unit, texture, level, layered ? GL_TRUE : GL_FALSE, layer, access, format); ``` +## 需要注意 + +- 这是完全原生参数透传,不会根据 `OpenGLTexture` 或 `OpenGLResourceView` 自动推导格式、层级或访问权限。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindTexture](BindTexture.md) +- [OpenGLResourceView](../OpenGLResourceView/OpenGLResourceView.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSampler.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSampler.md index 19b6fb98..1b5864a2 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSampler.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSampler.md @@ -1,32 +1,19 @@ -# OpenGLCommandList::BindSampler - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindSampler() ```cpp void BindSampler(unsigned int unit, unsigned int sampler); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `unit` - 参数语义详见头文件声明。 -- `sampler` - 参数语义详见头文件声明。 +把 sampler 绑定到指定纹理单元。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindSampler(...)。 - (void)object; -} +glBindSampler(unit, sampler); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindSamplers](BindSamplers.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSamplers.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSamplers.md index 9917fe4e..85a9a02f 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSamplers.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindSamplers.md @@ -1,33 +1,19 @@ -# OpenGLCommandList::BindSamplers - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindSamplers() ```cpp void BindSamplers(unsigned int first, unsigned int count, const unsigned int* samplers); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `first` - 参数语义详见头文件声明。 -- `count` - 参数语义详见头文件声明。 -- `samplers` - 参数语义详见头文件声明。 +批量绑定 sampler。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindSamplers(...)。 - (void)object; -} +glBindSamplers(first, count, samplers); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindSampler](BindSampler.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTexture.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTexture.md index 7298f765..c9f17f56 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTexture.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTexture.md @@ -1,33 +1,27 @@ -# OpenGLCommandList::BindTexture - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindTexture() ```cpp void BindTexture(unsigned int target, unsigned int unit, unsigned int texture); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 -- `unit` - 参数语义详见头文件声明。 -- `texture` - 参数语义详见头文件声明。 +把纹理绑定到指定 texture unit。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +函数会先切换 active texture unit,再绑定纹理: ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindTexture(...)。 - (void)object; -} +glActiveTexture(GL_TEXTURE0 + unit); +glBindTexture(target, texture); ``` +## 需要注意 + +- 会修改当前 active texture unit。 +- 不会恢复调用前的 active unit。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindTextures](BindTextures.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTextures.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTextures.md index 3ac80247..273c2741 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTextures.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindTextures.md @@ -1,33 +1,19 @@ -# OpenGLCommandList::BindTextures - -公开方法,详见头文件声明。 +# OpenGLCommandList::BindTextures() ```cpp void BindTextures(unsigned int first, unsigned int count, const unsigned int* textures); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `first` - 参数语义详见头文件声明。 -- `count` - 参数语义详见头文件声明。 -- `textures` - 参数语义详见头文件声明。 +批量绑定一段连续的 texture unit。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindTextures(...)。 - (void)object; -} +glBindTextures(first, count, textures); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BindTexture](BindTexture.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindVertexArray.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindVertexArray.md index 75daffb5..5c490b13 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindVertexArray.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BindVertexArray.md @@ -1,46 +1,33 @@ -# OpenGLCommandList::BindVertexArray - -公开方法,详见头文件声明。 - -该方法在 `XCEngine/RHI/OpenGL/OpenGLCommandList.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。 - -## 重载 1: 声明 +# OpenGLCommandList::BindVertexArray() ```cpp void BindVertexArray(unsigned int vao); -``` - -**参数:** -- `vao` - 参数语义详见头文件声明。 - -**返回:** `void` - 无返回值。 - -## 重载 2: 声明 - -```cpp void BindVertexArray(unsigned int vao, unsigned int indexBuffer, unsigned int indexType); ``` -**参数:** -- `vao` - 参数语义详见头文件声明。 -- `indexBuffer` - 参数语义详见头文件声明。 -- `indexType` - 参数语义详见头文件声明。 +## 作用 -**返回:** `void` - 无返回值。 +绑定 VAO,并在需要时同时配置索引缓冲上下文。 -**示例:** +## 当前实现行为 -```cpp -#include +### `BindVertexArray(unsigned int vao)` -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BindVertexArray(...)。 - (void)object; -} -``` +- `m_currentVAO = vao` +- `glBindVertexArray(vao)` + +### `BindVertexArray(unsigned int vao, unsigned int indexBuffer, unsigned int indexType)` + +- `m_currentVAO = vao` +- `glBindVertexArray(vao)` +- `glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuffer)` +- `m_currentIndexType = indexType` +- `m_currentIndexOffset = 0` + +## 需要注意 + +第二个重载会更新命令列表内部缓存的索引类型与偏移,这会直接影响后续 [DrawIndexedInstanced](DrawIndexedInstanced.md) 和 [DrawIndexedIndirect](DrawIndexedIndirect.md)。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [SetIndexBuffer](SetIndexBuffer.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BlitFramebuffer.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BlitFramebuffer.md index a8099704..06174933 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BlitFramebuffer.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/BlitFramebuffer.md @@ -1,40 +1,23 @@ -# OpenGLCommandList::BlitFramebuffer - -公开方法,详见头文件声明。 +# OpenGLCommandList::BlitFramebuffer() ```cpp void BlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, unsigned int mask, unsigned int filter); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `srcX0` - 参数语义详见头文件声明。 -- `srcY0` - 参数语义详见头文件声明。 -- `srcX1` - 参数语义详见头文件声明。 -- `srcY1` - 参数语义详见头文件声明。 -- `dstX0` - 参数语义详见头文件声明。 -- `dstY0` - 参数语义详见头文件声明。 -- `dstX1` - 参数语义详见头文件声明。 -- `dstY1` - 参数语义详见头文件声明。 -- `mask` - 参数语义详见头文件声明。 -- `filter` - 参数语义详见头文件声明。 +执行 framebuffer blit。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::BlitFramebuffer(...)。 - (void)object; -} +glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); ``` +## 需要注意 + +调用前必须由外部正确设置读/写 framebuffer 绑定。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [ReadPixels](ReadPixels.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Close.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Close.md index 5db96c9b..48a8e4e1 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Close.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Close.md @@ -1,30 +1,22 @@ -# OpenGLCommandList::Close - -公开方法,详见头文件声明。 +# OpenGLCommandList::Close() ```cpp void Close() override; ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** 无。 +结束命令列表录制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +当前实现为空函数,没有任何状态提交、校验或冻结逻辑。 -```cpp -#include +## 工程含义 -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::Close(...)。 - (void)object; -} -``` +这再次说明 `OpenGLCommandList` 不是可延迟提交的录制型命令缓冲,而更接近即时执行 facade。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Reset](Reset.md) +- [OpenGLCommandList](OpenGLCommandList.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/CopyImageSubData.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/CopyImageSubData.md index 5e8e0266..75689cd3 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/CopyImageSubData.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/CopyImageSubData.md @@ -1,45 +1,21 @@ -# OpenGLCommandList::CopyImageSubData - -公开方法,详见头文件声明。 +# OpenGLCommandList::CopyImageSubData() ```cpp void CopyImageSubData(unsigned int srcName, unsigned int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, unsigned int dstName, unsigned int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int width, int height, int depth); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `srcName` - 参数语义详见头文件声明。 -- `srcTarget` - 参数语义详见头文件声明。 -- `srcLevel` - 参数语义详见头文件声明。 -- `srcX` - 参数语义详见头文件声明。 -- `srcY` - 参数语义详见头文件声明。 -- `srcZ` - 参数语义详见头文件声明。 -- `dstName` - 参数语义详见头文件声明。 -- `dstTarget` - 参数语义详见头文件声明。 -- `dstLevel` - 参数语义详见头文件声明。 -- `dstX` - 参数语义详见头文件声明。 -- `dstY` - 参数语义详见头文件声明。 -- `dstZ` - 参数语义详见头文件声明。 -- `width` - 参数语义详见头文件声明。 -- `height` - 参数语义详见头文件声明。 -- `depth` - 参数语义详见头文件声明。 +执行纹理到纹理的子区域复制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +实现直接透传到: ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::CopyImageSubData(...)。 - (void)object; -} +glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [CopyResource](CopyResource.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disable.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disable.md index 20fa657e..09cace70 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disable.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disable.md @@ -1,31 +1,20 @@ -# OpenGLCommandList::Disable - -公开方法,详见头文件声明。 +# OpenGLCommandList::Disable() ```cpp void Disable(unsigned int cap); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `cap` - 参数语义详见头文件声明。 +关闭一个全局 OpenGL capability。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::Disable(...)。 - (void)object; -} +glDisable(cap); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Enable](Enable.md) +- [Disablei](Disablei.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disablei.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disablei.md index 135e2ed7..d26c1bf1 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disablei.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Disablei.md @@ -1,32 +1,20 @@ -# OpenGLCommandList::Disablei - -公开方法,详见头文件声明。 +# OpenGLCommandList::Disablei() ```cpp void Disablei(unsigned int cap, unsigned int index); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `cap` - 参数语义详见头文件声明。 -- `index` - 参数语义详见头文件声明。 +关闭某个带索引的 capability。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::Disablei(...)。 - (void)object; -} +glDisablei(cap, index); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Enablei](Enablei.md) +- [Disable](Disable.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchCompute.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchCompute.md index dc7987a3..5af90728 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchCompute.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchCompute.md @@ -1,33 +1,24 @@ -# OpenGLCommandList::DispatchCompute - -公开方法,详见头文件声明。 +# OpenGLCommandList::DispatchCompute() ```cpp void DispatchCompute(unsigned int x, unsigned int y, unsigned int z); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `x` - 参数语义详见头文件声明。 -- `y` - 参数语义详见头文件声明。 -- `z` - 参数语义详见头文件声明。 +发起一次计算着色器 dispatch。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::DispatchCompute(...)。 - (void)object; -} +glDispatchCompute(x, y, z); ``` +## 需要注意 + +它和跨后端覆盖方法 [Dispatch](Dispatch.md) 在当前实现上等价。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Dispatch](Dispatch.md) +- [DispatchIndirect](DispatchIndirect.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchIndirect.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchIndirect.md index 5a49fedd..d4fdf933 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchIndirect.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DispatchIndirect.md @@ -1,32 +1,21 @@ -# OpenGLCommandList::DispatchIndirect - -公开方法,详见头文件声明。 +# OpenGLCommandList::DispatchIndirect() ```cpp void DispatchIndirect(unsigned int buffer, size_t offset); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `buffer` - 参数语义详见头文件声明。 -- `offset` - 参数语义详见头文件声明。 +从间接参数缓冲发起计算 dispatch。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +函数会: -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::DispatchIndirect(...)。 - (void)object; -} -``` +1. `glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, buffer)` +2. `glDispatchComputeIndirect((GLintptr)offset)` +3. `glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [DispatchCompute](DispatchCompute.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedIndirect.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedIndirect.md index ee28ead3..f2b487b6 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedIndirect.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedIndirect.md @@ -1,35 +1,26 @@ -# OpenGLCommandList::DrawIndexedIndirect - -公开方法,详见头文件声明。 +# OpenGLCommandList::DrawIndexedIndirect() ```cpp void DrawIndexedIndirect(PrimitiveType type, unsigned int buffer, size_t offset, unsigned int drawCount, unsigned int stride); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `type` - 参数语义详见头文件声明。 -- `buffer` - 参数语义详见头文件声明。 -- `offset` - 参数语义详见头文件声明。 -- `drawCount` - 参数语义详见头文件声明。 -- `stride` - 参数语义详见头文件声明。 +执行一次索引间接绘制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +- 先把 `m_primitiveType` 更新为 `ToOpenGL(type)` +- 绑定 `GL_DRAW_INDIRECT_BUFFER` +- 调用 `glDrawElementsIndirect(m_primitiveType, m_currentIndexType, (void*)offset)` +- 解绑 `GL_DRAW_INDIRECT_BUFFER` -```cpp -#include +## 需要注意 -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::DrawIndexedIndirect(...)。 - (void)object; -} -``` +- `drawCount` 和 `stride` 当前被忽略。 +- 使用的索引类型来自命令列表缓存的 `m_currentIndexType`。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [DrawIndirect](DrawIndirect.md) +- [BindVertexArray](BindVertexArray.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedInstanced.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedInstanced.md index 3327e3cc..5d2c279a 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedInstanced.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndexedInstanced.md @@ -1,36 +1,25 @@ -# OpenGLCommandList::DrawIndexedInstanced - -公开方法,详见头文件声明。 +# OpenGLCommandList::DrawIndexedInstanced() ```cpp void DrawIndexedInstanced(PrimitiveType type, unsigned int indexCount, unsigned int instanceCount, unsigned int startIndex, int baseVertex, unsigned int startInstance); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `type` - 参数语义详见头文件声明。 -- `indexCount` - 参数语义详见头文件声明。 -- `instanceCount` - 参数语义详见头文件声明。 -- `startIndex` - 参数语义详见头文件声明。 -- `baseVertex` - 参数语义详见头文件声明。 -- `startInstance` - 参数语义详见头文件声明。 +执行一次带实例化的索引绘制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +- 更新 `m_primitiveType = ToOpenGL(type)` +- 根据 `m_currentIndexOffset + startIndex * indexTypeSize` 计算索引起始地址 +- 调用 `glDrawElementsInstanced(...)` -```cpp -#include +## 需要注意 -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::DrawIndexedInstanced(...)。 - (void)object; -} -``` +- `baseVertex` 当前被忽略。 +- `startInstance` 当前被忽略。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [DrawIndexed](DrawIndexed.md) +- [DrawIndexedIndirect](DrawIndexedIndirect.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndirect.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndirect.md index a650ce74..f6488a94 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndirect.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawIndirect.md @@ -1,35 +1,24 @@ -# OpenGLCommandList::DrawIndirect - -公开方法,详见头文件声明。 +# OpenGLCommandList::DrawIndirect() ```cpp void DrawIndirect(PrimitiveType type, unsigned int buffer, size_t offset, unsigned int drawCount, unsigned int stride); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `type` - 参数语义详见头文件声明。 -- `buffer` - 参数语义详见头文件声明。 -- `offset` - 参数语义详见头文件声明。 -- `drawCount` - 参数语义详见头文件声明。 -- `stride` - 参数语义详见头文件声明。 +执行一次非索引间接绘制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +- 先更新 `m_primitiveType` +- 绑定 `GL_DRAW_INDIRECT_BUFFER` +- 调用 `glDrawArraysIndirect(m_primitiveType, (void*)offset)` +- 解绑 `GL_DRAW_INDIRECT_BUFFER` -```cpp -#include +## 需要注意 -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::DrawIndirect(...)。 - (void)object; -} -``` +- `drawCount` 和 `stride` 当前被忽略。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [DrawIndexedIndirect](DrawIndexedIndirect.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawInstanced.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawInstanced.md index c1de1a08..73e96e76 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawInstanced.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/DrawInstanced.md @@ -1,35 +1,22 @@ -# OpenGLCommandList::DrawInstanced - -公开方法,详见头文件声明。 +# OpenGLCommandList::DrawInstanced() ```cpp void DrawInstanced(PrimitiveType type, unsigned int vertexCount, unsigned int instanceCount, unsigned int startVertex, unsigned int startInstance); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `type` - 参数语义详见头文件声明。 -- `vertexCount` - 参数语义详见头文件声明。 -- `instanceCount` - 参数语义详见头文件声明。 -- `startVertex` - 参数语义详见头文件声明。 -- `startInstance` - 参数语义详见头文件声明。 +执行一次带实例化的非索引绘制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +- 更新 `m_primitiveType = ToOpenGL(type)` +- 调用 `glDrawArraysInstanced(m_primitiveType, startVertex, vertexCount, instanceCount)` -```cpp -#include +## 需要注意 -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::DrawInstanced(...)。 - (void)object; -} -``` +- `startInstance` 当前被忽略。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Draw](Draw.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enable.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enable.md index 458c59b7..a60a0b56 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enable.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enable.md @@ -1,31 +1,20 @@ -# OpenGLCommandList::Enable - -公开方法,详见头文件声明。 +# OpenGLCommandList::Enable() ```cpp void Enable(unsigned int cap); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `cap` - 参数语义详见头文件声明。 +开启一个全局 OpenGL capability。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::Enable(...)。 - (void)object; -} +glEnable(cap); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Disable](Disable.md) +- [Enablei](Enablei.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableBlending.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableBlending.md index 3fec18d6..f1016596 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableBlending.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableBlending.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::EnableBlending - -公开方法,详见头文件声明。 +# OpenGLCommandList::EnableBlending() ```cpp void EnableBlending(bool enable); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `enable` - 参数语义详见头文件声明。 +开启或关闭全局混合状态。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EnableBlending(...)。 - (void)object; -} -``` +- `true` 时调用 `glEnable(GL_BLEND)` +- `false` 时调用 `glDisable(GL_BLEND)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [SetBlendFunc](SetBlendFunc.md) +- [SetBlendEquation](SetBlendEquation.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableCulling.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableCulling.md index b723664f..f7973f90 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableCulling.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableCulling.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::EnableCulling - -公开方法,详见头文件声明。 +# OpenGLCommandList::EnableCulling() ```cpp void EnableCulling(bool enable); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `enable` - 参数语义详见头文件声明。 +开启或关闭背面裁剪能力位。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EnableCulling(...)。 - (void)object; -} -``` +- `true` 时调用 `glEnable(GL_CULL_FACE)` +- `false` 时调用 `glDisable(GL_CULL_FACE)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [SetCullFace](SetCullFace.md) +- [SetFrontFace](SetFrontFace.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthTest.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthTest.md index 0bf620a6..eca66f36 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthTest.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthTest.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::EnableDepthTest - -公开方法,详见头文件声明。 +# OpenGLCommandList::EnableDepthTest() ```cpp void EnableDepthTest(bool enable); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `enable` - 参数语义详见头文件声明。 +开启或关闭深度测试。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EnableDepthTest(...)。 - (void)object; -} -``` +- `true` 时调用 `glEnable(GL_DEPTH_TEST)` +- `false` 时调用 `glDisable(GL_DEPTH_TEST)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [EnableDepthWrite](EnableDepthWrite.md) +- [SetDepthFunc](SetDepthFunc.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthWrite.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthWrite.md index e51bf159..f2694714 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthWrite.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableDepthWrite.md @@ -1,31 +1,23 @@ -# OpenGLCommandList::EnableDepthWrite - -公开方法,详见头文件声明。 +# OpenGLCommandList::EnableDepthWrite() ```cpp void EnableDepthWrite(bool enable); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `enable` - 参数语义详见头文件声明。 +控制深度写掩码。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EnableDepthWrite(...)。 - (void)object; -} +glDepthMask(enable ? GL_TRUE : GL_FALSE); ``` +## 需要注意 + +它不会自动开启或关闭深度测试,只影响深度写入。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [EnableDepthTest](EnableDepthTest.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableScissorTest.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableScissorTest.md index ad4c6626..6b734f09 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableScissorTest.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableScissorTest.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::EnableScissorTest - -公开方法,详见头文件声明。 +# OpenGLCommandList::EnableScissorTest() ```cpp void EnableScissorTest(bool enable); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `enable` - 参数语义详见头文件声明。 +开启或关闭 scissor test。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EnableScissorTest(...)。 - (void)object; -} -``` +- `true` 时调用 `glEnable(GL_SCISSOR_TEST)` +- `false` 时调用 `glDisable(GL_SCISSOR_TEST)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [SetScissor](SetScissor.md) +- [SetScissorRects](SetScissorRects.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableStencilTest.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableStencilTest.md index 61d079db..600072b3 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableStencilTest.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EnableStencilTest.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::EnableStencilTest - -公开方法,详见头文件声明。 +# OpenGLCommandList::EnableStencilTest() ```cpp void EnableStencilTest(bool enable); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `enable` - 参数语义详见头文件声明。 +开启或关闭模板测试。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EnableStencilTest(...)。 - (void)object; -} -``` +- `true` 时调用 `glEnable(GL_STENCIL_TEST)` +- `false` 时调用 `glDisable(GL_STENCIL_TEST)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [SetStencilFunc](SetStencilFunc.md) +- [SetStencilOp](SetStencilOp.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enablei.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enablei.md index 9e4ee82b..d73a2df7 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enablei.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Enablei.md @@ -1,32 +1,20 @@ -# OpenGLCommandList::Enablei - -公开方法,详见头文件声明。 +# OpenGLCommandList::Enablei() ```cpp void Enablei(unsigned int cap, unsigned int index); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `cap` - 参数语义详见头文件声明。 -- `index` - 参数语义详见头文件声明。 +开启某个带索引的 capability。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::Enablei(...)。 - (void)object; -} +glEnablei(cap, index); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Disablei](Disablei.md) +- [Enable](Enable.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndQuery.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndQuery.md index 7e79fd0b..2358e074 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndQuery.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndQuery.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::EndQuery - -公开方法,详见头文件声明。 +# OpenGLCommandList::EndQuery() ```cpp void EndQuery(unsigned int target); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 +结束指定 target 上的 query。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EndQuery(...)。 - (void)object; -} +glEndQuery(target); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BeginQuery](BeginQuery.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndRenderPass.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndRenderPass.md index 8d867f44..36b3eb5f 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndRenderPass.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/EndRenderPass.md @@ -1,30 +1,27 @@ -# OpenGLCommandList::EndRenderPass - -公开方法,详见头文件声明。 +# OpenGLCommandList::EndRenderPass() ```cpp void EndRenderPass() override; ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** 无。 +结束当前 render pass。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +当前实现只做: ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::EndRenderPass(...)。 - (void)object; -} +glBindFramebuffer(GL_FRAMEBUFFER, 0); ``` +## 需要注意 + +- 不会显式释放 `m_composedFramebuffer`。 +- 不会恢复更细粒度的 render pass 状态。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BeginRenderPass](BeginRenderPass.md) +- [SetRenderTargets](SetRenderTargets.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateFramebuffer.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateFramebuffer.md index 422132de..928db1ad 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateFramebuffer.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateFramebuffer.md @@ -1,33 +1,19 @@ -# OpenGLCommandList::InvalidateFramebuffer - -公开方法,详见头文件声明。 +# OpenGLCommandList::InvalidateFramebuffer() ```cpp void InvalidateFramebuffer(unsigned int target, unsigned int count, const unsigned int* attachments); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 -- `count` - 参数语义详见头文件声明。 -- `attachments` - 参数语义详见头文件声明。 +向驱动提示一组 framebuffer attachment 内容可被丢弃。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::InvalidateFramebuffer(...)。 - (void)object; -} +glInvalidateFramebuffer(target, count, attachments); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [InvalidateSubFramebuffer](InvalidateSubFramebuffer.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateSubFramebuffer.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateSubFramebuffer.md index 7f1658b2..ec8f5147 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateSubFramebuffer.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/InvalidateSubFramebuffer.md @@ -1,37 +1,19 @@ -# OpenGLCommandList::InvalidateSubFramebuffer - -公开方法,详见头文件声明。 +# OpenGLCommandList::InvalidateSubFramebuffer() ```cpp void InvalidateSubFramebuffer(unsigned int target, unsigned int count, const unsigned int* attachments, int x, int y, int width, int height); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `target` - 参数语义详见头文件声明。 -- `count` - 参数语义详见头文件声明。 -- `attachments` - 参数语义详见头文件声明。 -- `x` - 参数语义详见头文件声明。 -- `y` - 参数语义详见头文件声明。 -- `width` - 参数语义详见头文件声明。 -- `height` - 参数语义详见头文件声明。 +对 framebuffer 的一个子区域执行 invalidate 提示。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::InvalidateSubFramebuffer(...)。 - (void)object; -} +glInvalidateSubFramebuffer(target, count, attachments, x, y, width, height); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [InvalidateFramebuffer](InvalidateFramebuffer.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MemoryBarrier.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MemoryBarrier.md index b3008adc..54e3cac8 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MemoryBarrier.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MemoryBarrier.md @@ -1,31 +1,25 @@ -# OpenGLCommandList::MemoryBarrier - -公开方法,详见头文件声明。 +# OpenGLCommandList::MemoryBarrier() ```cpp void MemoryBarrier(unsigned int barriers); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `barriers` - 参数语义详见头文件声明。 +显式发出 OpenGL memory barrier。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::MemoryBarrier(...)。 - (void)object; -} +glMemoryBarrier(barriers); ``` +## 与 `TransitionBarrier()` 的区别 + +- `MemoryBarrier()` 只是原生 barrier 直通。 +- [TransitionBarrier](TransitionBarrier.md) 还会更新资源视图对应纹理的软状态元数据。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [TextureBarrier](TextureBarrier.md) +- [TransitionBarrier](TransitionBarrier.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawArrays.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawArrays.md index 63ff9bbc..21629c00 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawArrays.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawArrays.md @@ -1,34 +1,18 @@ -# OpenGLCommandList::MultiDrawArrays - -公开方法,详见头文件声明。 +# OpenGLCommandList::MultiDrawArrays() ```cpp void MultiDrawArrays(PrimitiveType type, const int* first, const int* count, unsigned int drawCount); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `type` - 参数语义详见头文件声明。 -- `first` - 参数语义详见头文件声明。 -- `count` - 参数语义详见头文件声明。 -- `drawCount` - 参数语义详见头文件声明。 +执行多次非索引绘制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::MultiDrawArrays(...)。 - (void)object; -} -``` +- 先更新 `m_primitiveType = ToOpenGL(type)` +- 再调用 `glMultiDrawArrays(m_primitiveType, first, count, drawCount)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [MultiDrawElements](MultiDrawElements.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawElements.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawElements.md index b068cb96..5159a0ec 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawElements.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/MultiDrawElements.md @@ -1,35 +1,22 @@ -# OpenGLCommandList::MultiDrawElements - -公开方法,详见头文件声明。 +# OpenGLCommandList::MultiDrawElements() ```cpp void MultiDrawElements(PrimitiveType type, const int* count, unsigned int type_, const void* const* indices, unsigned int drawCount); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `type` - 参数语义详见头文件声明。 -- `count` - 参数语义详见头文件声明。 -- `type_` - 参数语义详见头文件声明。 -- `indices` - 参数语义详见头文件声明。 -- `drawCount` - 参数语义详见头文件声明。 +执行多次索引绘制。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +- 先更新 `m_primitiveType = ToOpenGL(type)` +- 再调用 `glMultiDrawElements(m_primitiveType, count, type_, indices, drawCount)` -```cpp -#include +## 需要注意 -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::MultiDrawElements(...)。 - (void)object; -} -``` +索引类型来自参数 `type_`,而不是命令列表缓存的 `m_currentIndexType`。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [MultiDrawArrays](MultiDrawArrays.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PopDebugGroup.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PopDebugGroup.md index a4505398..5f58ffaf 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PopDebugGroup.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PopDebugGroup.md @@ -1,30 +1,19 @@ -# OpenGLCommandList::PopDebugGroup - -公开方法,详见头文件声明。 +# OpenGLCommandList::PopDebugGroup() ```cpp void PopDebugGroup(); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** 无。 +结束当前 OpenGL debug group。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::PopDebugGroup(...)。 - (void)object; -} +glPopDebugGroup(); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [PushDebugGroup](PushDebugGroup.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PushDebugGroup.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PushDebugGroup.md index 823ac4ec..804b993f 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PushDebugGroup.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/PushDebugGroup.md @@ -1,34 +1,19 @@ -# OpenGLCommandList::PushDebugGroup - -公开方法,详见头文件声明。 +# OpenGLCommandList::PushDebugGroup() ```cpp void PushDebugGroup(unsigned int source, unsigned int id, int length, const char* message); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `source` - 参数语义详见头文件声明。 -- `id` - 参数语义详见头文件声明。 -- `length` - 参数语义详见头文件声明。 -- `message` - 参数语义详见头文件声明。 +开始一个 OpenGL debug group。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::PushDebugGroup(...)。 - (void)object; -} +glPushDebugGroup(source, id, length, message); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [PopDebugGroup](PopDebugGroup.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/ReadPixels.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/ReadPixels.md index 887b2a1b..26c0626f 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/ReadPixels.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/ReadPixels.md @@ -1,37 +1,23 @@ -# OpenGLCommandList::ReadPixels - -公开方法,详见头文件声明。 +# OpenGLCommandList::ReadPixels() ```cpp void ReadPixels(int x, int y, int width, int height, unsigned int format, unsigned int type, void* data); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `x` - 参数语义详见头文件声明。 -- `y` - 参数语义详见头文件声明。 -- `width` - 参数语义详见头文件声明。 -- `height` - 参数语义详见头文件声明。 -- `format` - 参数语义详见头文件声明。 -- `type` - 参数语义详见头文件声明。 -- `data` - 参数语义详见头文件声明。 +从当前 read framebuffer 读取像素。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::ReadPixels(...)。 - (void)object; -} +glReadPixels(x, y, width, height, format, type, data); ``` +## 需要注意 + +函数不会调整 pack 状态,也不会切换 read framebuffer。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [BlitFramebuffer](BlitFramebuffer.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Reset.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Reset.md index 8e7c621a..4f221282 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Reset.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/Reset.md @@ -1,30 +1,34 @@ -# OpenGLCommandList::Reset - -公开方法,详见头文件声明。 +# OpenGLCommandList::Reset() ```cpp void Reset() override; ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** 无。 +重置命令列表中的一部分缓存状态。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** +`Reset()` 会: -```cpp -#include +- 调用 `ReleaseComposedFramebuffer()` +- 把 `m_currentPipelineState` 设为 `nullptr` +- 把 `m_currentIndexOffset` 重置为 `0` +- 把 `m_currentIndexType` 重置为 `GL_UNSIGNED_INT` -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::Reset(...)。 - (void)object; -} -``` +## 需要注意 + +它不会: + +- 删除 `m_internalVAO` +- 清空 `m_currentProgram` +- 重置 `m_primitiveType` +- 关闭已经启用的 capability + +所以它不是“完全回到构造态”,而是一次部分缓存清理。 ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [Close](Close.md) +- [Shutdown](Shutdown.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/TextureBarrier.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/TextureBarrier.md index a395741e..9a03e610 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/TextureBarrier.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/TextureBarrier.md @@ -1,30 +1,19 @@ -# OpenGLCommandList::TextureBarrier - -公开方法,详见头文件声明。 +# OpenGLCommandList::TextureBarrier() ```cpp void TextureBarrier(); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** 无。 +发出 OpenGL 纹理相关 barrier。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::TextureBarrier(...)。 - (void)object; -} +glTextureBarrier(); ``` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [MemoryBarrier](MemoryBarrier.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseProgram.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseProgram.md index 2cee1c2c..767f42a0 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseProgram.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseProgram.md @@ -1,31 +1,23 @@ -# OpenGLCommandList::UseProgram - -公开方法,详见头文件声明。 +# OpenGLCommandList::UseProgram() ```cpp void UseProgram(unsigned int program); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `program` - 参数语义详见头文件声明。 +直接调用 OpenGL 绑定 program。 -**返回:** `void` - 无返回值。 - -**示例:** +## 当前实现行为 ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::UseProgram(...)。 - (void)object; -} +glUseProgram(program); ``` +## 与 `UseShader()` 的区别 + +这个函数不会更新命令列表内部缓存的 `m_currentProgram`。如果上层逻辑依赖这份缓存,应该优先使用 [UseShader](UseShader.md)。 + ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [UseShader](UseShader.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseShader.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseShader.md index daa71fcf..17e23e79 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseShader.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLCommandList/UseShader.md @@ -1,31 +1,19 @@ -# OpenGLCommandList::UseShader - -公开方法,详见头文件声明。 +# OpenGLCommandList::UseShader() ```cpp void UseShader(unsigned int program); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLCommandList.h`,当前页面用于固定 `OpenGLCommandList` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** -- `program` - 参数语义详见头文件声明。 +绑定 program,并同步更新命令列表内部缓存。 -**返回:** `void` - 无返回值。 +## 当前实现行为 -**示例:** - -```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLCommandList object; - // 根据上下文补齐参数后调用 OpenGLCommandList::UseShader(...)。 - (void)object; -} -``` +- `m_currentProgram = program` +- `glUseProgram(program)` ## 相关文档 -- [返回类总览](OpenGLCommandList.md) -- [返回模块目录](../OpenGL.md) +- [UseProgram](UseProgram.md) +- [SetShader](SetShader.md) diff --git a/docs/api/XCEngine/RHI/OpenGL/OpenGLDevice/MakeContextCurrent.md b/docs/api/XCEngine/RHI/OpenGL/OpenGLDevice/MakeContextCurrent.md index c8d7ce9e..c3d6d681 100644 --- a/docs/api/XCEngine/RHI/OpenGL/OpenGLDevice/MakeContextCurrent.md +++ b/docs/api/XCEngine/RHI/OpenGL/OpenGLDevice/MakeContextCurrent.md @@ -1,30 +1,36 @@ -# OpenGLDevice::MakeContextCurrent - -公开方法,详见头文件声明。 +# OpenGLDevice::MakeContextCurrent() ```cpp bool MakeContextCurrent(); ``` -该方法声明于 `XCEngine/RHI/OpenGL/OpenGLDevice.h`,当前页面用于固定 `OpenGLDevice` 类目录下的方法级 canonical 路径。 +## 作用 -**参数:** 无。 +把当前设备持有的 WGL 上下文切换为当前线程上下文。 -**返回:** `bool` - 返回值语义详见头文件声明。 +## 返回值 -**示例:** +- `true`: `m_hdc` 和 `m_hglrc` 都存在,且 `wglMakeCurrent(m_hdc, m_hglrc)` 返回成功。 +- `false`: 任一句柄为空,或 `wglMakeCurrent` 失败。 + +## 当前实现行为 + +函数逻辑非常直接: ```cpp -#include - -void Example() { - XCEngine::RHI::OpenGLDevice object; - // 根据上下文补齐参数后调用 OpenGLDevice::MakeContextCurrent(...)。 - (void)object; +if (m_hdc && m_hglrc) { + return ::wglMakeCurrent(m_hdc, m_hglrc) == TRUE; } +return false; ``` +## 需要注意 + +- 当前不会先检查“这个上下文是否已经是当前上下文”。 +- 它是很多资源创建路径的前置条件,例如 `CreateTexture()`、`CreateShader()`、`CreatePipelineState()`。 + ## 相关文档 -- [返回类总览](OpenGLDevice.md) -- [返回模块目录](../OpenGL.md) +- [OpenGLDevice](OpenGLDevice.md) +- [Initialize](Initialize.md) +- [InitializeWithExistingWindow](InitializeWithExistingWindow.md) diff --git a/docs/api/_meta/rebuild-status.md b/docs/api/_meta/rebuild-status.md index 62847cb3..b6119aa6 100644 --- a/docs/api/_meta/rebuild-status.md +++ b/docs/api/_meta/rebuild-status.md @@ -1,6 +1,6 @@ # API 文档重构状态 -**生成时间**: `2026-03-28 02:20:55` +**生成时间**: `2026-03-28 02:28:02` **来源**: `docs/api/_tools/audit_api_docs.py`