Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation: - Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods - Fixed wrong links to buffer docs for GetNativeHandle methods - Fixed wrong links to shader docs for Bind/Unbind methods - Fixed wrong links to command-list docs for Clear/Reset/Close methods - Fixed wrong links to buffer/get-size.md for width/height methods Added missing documentation files: - OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md - OpenGL fence: initialize.md, reset.md - OpenGL swap-chain: get-size.md, initialize.md - OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md - OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md - OpenGL command-list: clear.md All links validated with fix_links.py - no broken references.
This commit is contained in:
17
docs/api/rhi/opengl/buffer/bind.md
Normal file
17
docs/api/rhi/opengl/buffer/bind.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenGLBuffer::Bind
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Bind() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
绑定缓冲区到 OpenGL 目标。
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
buffer.Bind();
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLBuffer 总览](buffer.md) - 返回类总览
|
||||||
@@ -8,19 +8,19 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` | [详细文档](initialize.md) |
|
||||||
| `InitializeVertexBuffer` | [详细文档](initialize-vertex-buffer.md) |
|
| `InitializeVertexBuffer` | [详细文档](initialize-vertex-buffer.md) |
|
||||||
| `InitializeIndexBuffer` | [详细文档](initialize-index-buffer.md) |
|
| `InitializeIndexBuffer` | [详细文档](initialize-index-buffer.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../buffer/shutdown.md) |
|
||||||
| `Bind` | [详细文档](../../shader/bind.md) |
|
| `Bind` | [详细文档](bind.md) |
|
||||||
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
| `Unbind` | [详细文档](unbind.md) |
|
||||||
| `BindBase` | [详细文档](bind-base.md) |
|
| `BindBase` | [详细文档](bind-base.md) |
|
||||||
| `Map` | [详细文档](../../buffer/map.md) |
|
| `Map` | [详细文档](../../buffer/map.md) |
|
||||||
| `Unmap` | [详细文档](../../buffer/unmap.md) |
|
| `Unmap` | [详细文档](../../buffer/unmap.md) |
|
||||||
| `SetData` | [详细文档](../../buffer/set-data.md) |
|
| `SetData` | [详细文档](../../buffer/set-data.md) |
|
||||||
| `GetID` | [详细文档](get-id.md) |
|
| `GetID` | [详细文档](get-id.md) |
|
||||||
| `GetSize` | [详细文档](../../buffer/get-size.md) |
|
| `GetSize` | [详细文档](../../buffer/get-size.md) |
|
||||||
| `GetType` | [详细文档](../../shader/get-type.md) |
|
| `GetType` | [详细文档](../../command-queue/get-type.md) |
|
||||||
| `IsDynamic` | [详细文档](is-dynamic.md) |
|
| `IsDynamic` | [详细文档](is-dynamic.md) |
|
||||||
| `GetBufferType` / `SetBufferType` | [详细文档](../../buffer/get-buffer-type.md) |
|
| `GetBufferType` / `SetBufferType` | [详细文档](../../buffer/get-buffer-type.md) |
|
||||||
| `GetStride` / `SetStride` | [详细文档](../../buffer/get-stride.md) |
|
| `GetStride` / `SetStride` | [详细文档](../../buffer/get-stride.md) |
|
||||||
|
|||||||
19
docs/api/rhi/opengl/buffer/get-type.md
Normal file
19
docs/api/rhi/opengl/buffer/get-type.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# OpenGLBuffer::GetType
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
OpenGLBufferType GetType() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
获取缓冲区类型。
|
||||||
|
|
||||||
|
**返回:** OpenGL 缓冲区类型
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
OpenGLBufferType type = buffer.GetType();
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLBuffer 总览](buffer.md) - 返回类总览
|
||||||
26
docs/api/rhi/opengl/buffer/initialize.md
Normal file
26
docs/api/rhi/opengl/buffer/initialize.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# OpenGLBuffer::Initialize
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
bool Initialize(OpenGLBufferType type, size_t size, const void* data = nullptr, bool dynamic = false);
|
||||||
|
```
|
||||||
|
|
||||||
|
初始化 OpenGL 缓冲区。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `type` - 缓冲区类型
|
||||||
|
- `size` - 缓冲区大小(字节)
|
||||||
|
- `data` - 初始数据指针(可选)
|
||||||
|
- `dynamic` - 是否为动态缓冲区
|
||||||
|
|
||||||
|
**返回:** 成功返回 true
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
OpenGLBuffer buffer;
|
||||||
|
buffer.Initialize(OpenGLBufferType::Vertex, sizeof(vertices), vertices);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLBuffer 总览](buffer.md) - 返回类总览
|
||||||
17
docs/api/rhi/opengl/buffer/unbind.md
Normal file
17
docs/api/rhi/opengl/buffer/unbind.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenGLBuffer::Unbind
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Unbind() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
解除绑定缓冲区。
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
buffer.Unbind();
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLBuffer 总览](buffer.md) - 返回类总览
|
||||||
24
docs/api/rhi/opengl/command-list/clear.md
Normal file
24
docs/api/rhi/opengl/command-list/clear.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# OpenGLCommandList::Clear
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Clear(float r, float g, float b, float a, unsigned int buffers);
|
||||||
|
```
|
||||||
|
|
||||||
|
清除缓冲区。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `r` - 红色分量
|
||||||
|
- `g` - 绿色分量
|
||||||
|
- `b` - 蓝色分量
|
||||||
|
- `a` - Alpha 分量
|
||||||
|
- `buffers` - 要清除的缓冲区标志
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
commandList->Clear(0.0f, 0.0f, 0.0f, 1.0f, Color | Depth);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLCommandList 总览](command-list.md) - 返回类总览
|
||||||
@@ -9,9 +9,9 @@
|
|||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
||||||
| `Reset` | [详细文档](../../../resources/resourcehandle/reset.md) |
|
| `Reset` | [详细文档](../../command-list/reset.md) |
|
||||||
| `Close` | [详细文档](../../../core/filewriter/close.md) |
|
| `Close` | [详细文档](../../command-list/close.md) |
|
||||||
| `Clear` | [详细文档](../../../memory/linear-allocator/clear.md) |
|
| `Clear` | [详细文档](clear.md) |
|
||||||
| `ClearColor` | [详细文档](clear-color.md) |
|
| `ClearColor` | [详细文档](clear-color.md) |
|
||||||
| `ClearDepth` | [详细文档](clear-depth.md) |
|
| `ClearDepth` | [详细文档](clear-depth.md) |
|
||||||
| `ClearStencil` | [详细文档](clear-stencil.md) |
|
| `ClearStencil` | [详细文档](clear-stencil.md) |
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../command-queue/shutdown.md) |
|
||||||
| `ExecuteCommandLists` | [详细文档](execute-command-lists.md) |
|
| `ExecuteCommandLists` | [详细文档](execute-command-lists.md) |
|
||||||
| `Signal` | [详细文档](signal.md) |
|
| `Signal` | [详细文档](signal.md) |
|
||||||
| `Wait` | [详细文档](../../../threading/task-group/wait.md) |
|
| `Wait` | [详细文档](../../../threading/task-group/wait.md) |
|
||||||
| `GetCompletedValue` | [详细文档](get-completed-value.md) |
|
| `GetCompletedValue` | [详细文档](get-completed-value.md) |
|
||||||
| `WaitForIdle` | [详细文档](wait-for-idle.md) |
|
| `WaitForIdle` | [详细文档](wait-for-idle.md) |
|
||||||
| `GetType` | [详细文档](../../shader/get-type.md) |
|
| `GetType` | [详细文档](../../command-queue/get-type.md) |
|
||||||
| `GetTimestampFrequency` | [详细文档](get-timestamp-frequency.md) |
|
| `GetTimestampFrequency` | [详细文档](get-timestamp-frequency.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../command-queue/get-native-handle.md) |
|
||||||
|
|
||||||
## 相关文档
|
## 相关文档
|
||||||
|
|
||||||
|
|||||||
11
docs/api/rhi/opengl/depth-stencil-view/bind.md
Normal file
11
docs/api/rhi/opengl/depth-stencil-view/bind.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenGLDepthStencilView::Bind
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Bind() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
绑定深度模板视图。
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLDepthStencilView 总览](depth-stencil-view.md) - 返回类总览
|
||||||
@@ -8,18 +8,18 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` | [详细文档](initialize.md) |
|
||||||
| `InitializeCubemap` | [详细文档](initialize-cubemap.md) |
|
| `InitializeCubemap` | [详细文档](initialize-cubemap.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](shutdown.md) |
|
||||||
| `Bind` | [详细文档](../../shader/bind.md) |
|
| `Bind` | [详细文档](bind.md) |
|
||||||
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
| `Unbind` | [详细文档](unbind.md) |
|
||||||
| `ClearDepth` | [详细文档](clear-depth.md) |
|
| `ClearDepth` | [详细文档](clear-depth.md) |
|
||||||
| `ClearStencil` | [详细文档](clear-stencil.md) |
|
| `ClearStencil` | [详细文档](clear-stencil.md) |
|
||||||
| `ClearDepthStencil` | [详细文档](clear-depth-stencil.md) |
|
| `ClearDepthStencil` | [详细文档](clear-depth-stencil.md) |
|
||||||
| `GetFramebuffer` | [详细文档](get-framebuffer.md) |
|
| `GetFramebuffer` | [详细文档](get-framebuffer.md) |
|
||||||
| `GetTexture` | [详细文档](get-texture.md) |
|
| `GetTexture` | [详细文档](get-texture.md) |
|
||||||
| `GetMipLevel` | [详细文档](get-mip-level.md) |
|
| `GetMipLevel` | [详细文档](get-mip-level.md) |
|
||||||
| `GetWidth` / `GetHeight` | [详细文档](../../buffer/get-size.md) |
|
| `GetWidth` / `GetHeight` | [详细文档](get-size.md) |
|
||||||
| `BindFramebuffer` | [详细文档](bind-framebuffer.md) |
|
| `BindFramebuffer` | [详细文档](bind-framebuffer.md) |
|
||||||
| `UnbindFramebuffer` | [详细文档](unbind-framebuffer.md) |
|
| `UnbindFramebuffer` | [详细文档](unbind-framebuffer.md) |
|
||||||
|
|
||||||
|
|||||||
14
docs/api/rhi/opengl/depth-stencil-view/get-size.md
Normal file
14
docs/api/rhi/opengl/depth-stencil-view/get-size.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# OpenGLDepthStencilView::GetWidth / GetHeight
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
int GetWidth() const;
|
||||||
|
int GetHeight() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
获取深度模板视图的宽度和高度。
|
||||||
|
|
||||||
|
**返回:** 宽度/高度
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLDepthStencilView 总览](depth-stencil-view.md) - 返回类总览
|
||||||
18
docs/api/rhi/opengl/depth-stencil-view/initialize.md
Normal file
18
docs/api/rhi/opengl/depth-stencil-view/initialize.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# OpenGLDepthStencilView::Initialize
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
bool Initialize(unsigned int texture, int width, int height);
|
||||||
|
```
|
||||||
|
|
||||||
|
初始化深度模板视图。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `texture` - OpenGL 纹理 ID
|
||||||
|
- `width` - 宽度
|
||||||
|
- `height` - 高度
|
||||||
|
|
||||||
|
**返回:** 成功返回 true
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLDepthStencilView 总览](depth-stencil-view.md) - 返回类总览
|
||||||
11
docs/api/rhi/opengl/depth-stencil-view/shutdown.md
Normal file
11
docs/api/rhi/opengl/depth-stencil-view/shutdown.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenGLDepthStencilView::Shutdown
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Shutdown();
|
||||||
|
```
|
||||||
|
|
||||||
|
关闭深度模板视图。
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLDepthStencilView 总览](depth-stencil-view.md) - 返回类总览
|
||||||
11
docs/api/rhi/opengl/depth-stencil-view/unbind.md
Normal file
11
docs/api/rhi/opengl/depth-stencil-view/unbind.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenGLDepthStencilView::Unbind
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Unbind() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
解除绑定深度模板视图。
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLDepthStencilView 总览](depth-stencil-view.md) - 返回类总览
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` | [详细文档](../../device/initialize.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../device/shutdown.md) |
|
||||||
| `CreateRenderWindow` | [详细文档](create-render-window.md) |
|
| `CreateRenderWindow` | [详细文档](create-render-window.md) |
|
||||||
| `InitializeWithExistingWindow` | [详细文档](initialize-with-existing-window.md) |
|
| `InitializeWithExistingWindow` | [详细文档](initialize-with-existing-window.md) |
|
||||||
| `GetWindow` | [详细文档](get-window.md) |
|
| `GetWindow` | [详细文档](get-window.md) |
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
| `GetCapabilities` | [详细文档](../../device/get-capabilities.md) |
|
| `GetCapabilities` | [详细文档](../../device/get-capabilities.md) |
|
||||||
| `GetDeviceInfo` | [详细文档](../../device/get-device-info.md) |
|
| `GetDeviceInfo` | [详细文档](../../device/get-device-info.md) |
|
||||||
| `GetNativeDevice` | [详细文档](../../device/get-native-device.md) |
|
| `GetNativeDevice` | [详细文档](../../device/get-native-device.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../swap-chain/get-native-handle.md) |
|
||||||
|
|
||||||
## 相关文档
|
## 相关文档
|
||||||
|
|
||||||
|
|||||||
@@ -8,16 +8,16 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` | [详细文档](initialize.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../fence/shutdown.md) |
|
||||||
| `Signal` | [详细文档](signal.md) |
|
| `Signal` | [详细文档](signal.md) |
|
||||||
| `Wait` | [详细文档](../../../threading/task-group/wait.md) |
|
| `Wait` | [详细文档](../../../threading/task-group/wait.md) |
|
||||||
| `Reset` | [详细文档](../../../resources/resourcehandle/reset.md) |
|
| `Reset` | [详细文档](reset.md) |
|
||||||
| `IsSignaled` | [详细文档](is-signaled.md) |
|
| `IsSignaled` | [详细文档](is-signaled.md) |
|
||||||
| `GetStatus` | [详细文档](get-status.md) |
|
| `GetStatus` | [详细文档](get-status.md) |
|
||||||
| `GetCompletedValue` | [详细文档](get-completed-value.md) |
|
| `GetCompletedValue` | [详细文档](get-completed-value.md) |
|
||||||
| `GetCurrentValue` | [详细文档](get-current-value.md) |
|
| `GetCurrentValue` | [详细文档](get-current-value.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../fence/get-native-handle.md) |
|
||||||
|
|
||||||
## 相关文档
|
## 相关文档
|
||||||
|
|
||||||
|
|||||||
23
docs/api/rhi/opengl/fence/initialize.md
Normal file
23
docs/api/rhi/opengl/fence/initialize.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# OpenGLFence::Initialize
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
bool Initialize(bool signaled = false);
|
||||||
|
```
|
||||||
|
|
||||||
|
初始化 OpenGL 栅栏。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `signaled` - 初始是否为 signaled 状态
|
||||||
|
|
||||||
|
**返回:** 成功返回 true
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
OpenGLFence fence;
|
||||||
|
fence.Initialize(true);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLFence 总览](fence.md) - 返回类总览
|
||||||
17
docs/api/rhi/opengl/fence/reset.md
Normal file
17
docs/api/rhi/opengl/fence/reset.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenGLFence::Reset
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Reset();
|
||||||
|
```
|
||||||
|
|
||||||
|
重置栅栏。
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
fence->Reset();
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLFence 总览](fence.md) - 返回类总览
|
||||||
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../pipeline-state/shutdown.md) |
|
||||||
| `Bind` | [详细文档](../../shader/bind.md) |
|
| `Bind` | [详细文档](../../shader/bind.md) |
|
||||||
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../pipeline-state/get-native-handle.md) |
|
||||||
| `GetType` | [详细文档](../../shader/get-type.md) |
|
| `GetType` | [详细文档](../../pipeline-state/get-type.md) |
|
||||||
| `SetDepthStencilState` | [详细文档](set-depth-stencil-state.md) |
|
| `SetDepthStencilState` | [详细文档](set-depth-stencil-state.md) |
|
||||||
| `SetBlendState` | [详细文档](set-blend-state.md) |
|
| `SetBlendState` | [详细文档](set-blend-state.md) |
|
||||||
| `SetRasterizerState` | [详细文档](set-rasterizer-state.md) |
|
| `SetRasterizerState` | [详细文档](set-rasterizer-state.md) |
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
| `ApplyViewport` | [详细文档](apply-viewport.md) |
|
| `ApplyViewport` | [详细文档](apply-viewport.md) |
|
||||||
| `ApplyScissor` | [详细文档](apply-scissor.md) |
|
| `ApplyScissor` | [详细文档](apply-scissor.md) |
|
||||||
| `SetClearColor` | [详细文档](set-clear-color.md) |
|
| `SetClearColor` | [详细文档](set-clear-color.md) |
|
||||||
| `Clear` | [详细文档](../../../memory/linear-allocator/clear.md) |
|
| `Clear` | [详细文档](../../command-list/clear.md) |
|
||||||
| `AttachShader` | [详细文档](attach-shader.md) |
|
| `AttachShader` | [详细文档](attach-shader.md) |
|
||||||
| `DetachShader` | [详细文档](detach-shader.md) |
|
| `DetachShader` | [详细文档](detach-shader.md) |
|
||||||
| `GetDepthStencilState` | [详细文档](get-depth-stencil-state.md) |
|
| `GetDepthStencilState` | [详细文档](get-depth-stencil-state.md) |
|
||||||
|
|||||||
11
docs/api/rhi/opengl/render-target-view/bind.md
Normal file
11
docs/api/rhi/opengl/render-target-view/bind.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenGLRenderTargetView::Bind
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Bind() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
绑定渲染目标视图。
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|
||||||
17
docs/api/rhi/opengl/render-target-view/clear.md
Normal file
17
docs/api/rhi/opengl/render-target-view/clear.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# OpenGLRenderTargetView::Clear
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Clear(float r, float g, float b, float a);
|
||||||
|
```
|
||||||
|
|
||||||
|
清除渲染目标视图。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `r` - 红色分量
|
||||||
|
- `g` - 绿色分量
|
||||||
|
- `b` - 蓝色分量
|
||||||
|
- `a` - Alpha 分量
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|
||||||
14
docs/api/rhi/opengl/render-target-view/get-size.md
Normal file
14
docs/api/rhi/opengl/render-target-view/get-size.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# OpenGLRenderTargetView::GetWidth / GetHeight
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
int GetWidth() const;
|
||||||
|
int GetHeight() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
获取渲染目标视图的宽度和高度。
|
||||||
|
|
||||||
|
**返回:** 宽度/高度
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|
||||||
18
docs/api/rhi/opengl/render-target-view/initialize.md
Normal file
18
docs/api/rhi/opengl/render-target-view/initialize.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# OpenGLRenderTargetView::Initialize
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
bool Initialize(unsigned int texture, int width, int height);
|
||||||
|
```
|
||||||
|
|
||||||
|
初始化渲染目标视图。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `texture` - OpenGL 纹理 ID
|
||||||
|
- `width` - 宽度
|
||||||
|
- `height` - 高度
|
||||||
|
|
||||||
|
**返回:** 成功返回 true
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|
||||||
@@ -8,16 +8,16 @@
|
|||||||
|
|
||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` | [详细文档](initialize.md) |
|
||||||
| `InitializeCubemap` | [详细文档](initialize-cubemap.md) |
|
| `InitializeCubemap` | [详细文档](initialize-cubemap.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](shutdown.md) |
|
||||||
| `Bind` | [详细文档](../../shader/bind.md) |
|
| `Bind` | [详细文档](bind.md) |
|
||||||
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
| `Unbind` | [详细文档](unbind.md) |
|
||||||
| `Clear` | [详细文档](../../../memory/linear-allocator/clear.md) |
|
| `Clear` | [详细文档](clear.md) |
|
||||||
| `GetFramebuffer` | [详细文档](get-framebuffer.md) |
|
| `GetFramebuffer` | [详细文档](get-framebuffer.md) |
|
||||||
| `GetTexture` | [详细文档](get-texture.md) |
|
| `GetTexture` | [详细文档](get-texture.md) |
|
||||||
| `GetMipLevel` | [详细文档](get-mip-level.md) |
|
| `GetMipLevel` | [详细文档](get-mip-level.md) |
|
||||||
| `GetWidth` / `GetHeight` | [详细文档](../../buffer/get-size.md) |
|
| `GetWidth` / `GetHeight` | [详细文档](get-size.md) |
|
||||||
| `BindFramebuffer` | [详细文档](bind-framebuffer.md) |
|
| `BindFramebuffer` | [详细文档](bind-framebuffer.md) |
|
||||||
| `UnbindFramebuffer` | [详细文档](unbind-framebuffer.md) |
|
| `UnbindFramebuffer` | [详细文档](unbind-framebuffer.md) |
|
||||||
|
|
||||||
|
|||||||
11
docs/api/rhi/opengl/render-target-view/shutdown.md
Normal file
11
docs/api/rhi/opengl/render-target-view/shutdown.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenGLRenderTargetView::Shutdown
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Shutdown();
|
||||||
|
```
|
||||||
|
|
||||||
|
关闭渲染目标视图。
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|
||||||
11
docs/api/rhi/opengl/render-target-view/unbind.md
Normal file
11
docs/api/rhi/opengl/render-target-view/unbind.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# OpenGLRenderTargetView::Unbind
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
void Unbind() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
解除绑定渲染目标视图。
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
| 方法 | 文档 |
|
| 方法 | 文档 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../sampler/shutdown.md) |
|
||||||
| `Bind` | [详细文档](../../shader/bind.md) |
|
| `Bind` | [详细文档](../../shader/bind.md) |
|
||||||
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
||||||
| `GetID` | [详细文档](get-id.md) |
|
| `GetID` | [详细文档](get-id.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../sampler/get-native-handle.md) |
|
||||||
|
|
||||||
## 相关文档
|
## 相关文档
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,10 @@
|
|||||||
|------|------|
|
|------|------|
|
||||||
| `CompileFromFile` | [详细文档](../../shader/compile-from-file.md) |
|
| `CompileFromFile` | [详细文档](../../shader/compile-from-file.md) |
|
||||||
| `Compile` | [详细文档](../../shader/compile.md) |
|
| `Compile` | [详细文档](../../shader/compile.md) |
|
||||||
| `CompileFromFile` (VS+FS) | [详细文档](compile-from-file-vs-fs.md) |
|
| `Shutdown` | [详细文档](../../shader/shutdown.md) |
|
||||||
| `CompileFromFile` (VS+GS+FS) | [详细文档](compile-from-file-vs-gs-fs.md) |
|
|
||||||
| `Compile` (VS+FS) | [详细文档](compile-vs-fs.md) |
|
|
||||||
| `CompileCompute` | [详细文档](compile-compute.md) |
|
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
|
||||||
| `Use` | [详细文档](use.md) |
|
| `Use` | [详细文档](use.md) |
|
||||||
| `Bind` / `Unbind` | [详细文档](../../shader/bind.md) |
|
| `Bind` | [详细文档](../../shader/bind.md) |
|
||||||
|
| `Unbind` | [详细文档](../../shader/unbind.md) |
|
||||||
| `SetInt` | [详细文档](../../shader/set-int.md) |
|
| `SetInt` | [详细文档](../../shader/set-int.md) |
|
||||||
| `SetIntArray` | [详细文档](set-int-array.md) |
|
| `SetIntArray` | [详细文档](set-int-array.md) |
|
||||||
| `SetFloat` | [详细文档](../../shader/set-float.md) |
|
| `SetFloat` | [详细文档](../../shader/set-float.md) |
|
||||||
@@ -26,7 +23,7 @@
|
|||||||
| `SetMat4` | [详细文档](../../shader/set-mat4.md) |
|
| `SetMat4` | [详细文档](../../shader/set-mat4.md) |
|
||||||
| `GetUniformLocation` | [详细文档](get-uniform-location.md) |
|
| `GetUniformLocation` | [详细文档](get-uniform-location.md) |
|
||||||
| `GetID` | [详细文档](get-id.md) |
|
| `GetID` | [详细文档](get-id.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../shader/get-native-handle.md) |
|
||||||
| `IsValid` | [详细文档](../../shader/is-valid.md) |
|
| `IsValid` | [详细文档](../../shader/is-valid.md) |
|
||||||
| `GetType` | [详细文档](../../shader/get-type.md) |
|
| `GetType` | [详细文档](../../shader/get-type.md) |
|
||||||
|
|
||||||
|
|||||||
21
docs/api/rhi/opengl/swap-chain/get-size.md
Normal file
21
docs/api/rhi/opengl/swap-chain/get-size.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# OpenGLSwapChain::GetWidth / GetHeight
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
int GetWidth() const;
|
||||||
|
int GetHeight() const;
|
||||||
|
```
|
||||||
|
|
||||||
|
获取交换链的宽度和高度。
|
||||||
|
|
||||||
|
**返回:** 宽度/高度(像素)
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
int width = swapChain->GetWidth();
|
||||||
|
int height = swapChain->GetHeight();
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
|
||||||
24
docs/api/rhi/opengl/swap-chain/initialize.md
Normal file
24
docs/api/rhi/opengl/swap-chain/initialize.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# OpenGLSwapChain::Initialize
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
bool Initialize(GLFWwindow* window, bool vsync = true);
|
||||||
|
```
|
||||||
|
|
||||||
|
初始化 OpenGL 交换链。
|
||||||
|
|
||||||
|
**参数:**
|
||||||
|
- `window` - GLFW 窗口指针
|
||||||
|
- `vsync` - 是否启用垂直同步
|
||||||
|
|
||||||
|
**返回:** 成功返回 true
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
OpenGLSwapChain swapChain;
|
||||||
|
swapChain.Initialize(window, true);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|------|------|
|
|------|------|
|
||||||
| `Initialize` (vsync) | [详细文档](../../../threading/task-system/initialize.md) |
|
| `Initialize` (vsync) | [详细文档](../../../threading/task-system/initialize.md) |
|
||||||
| `Initialize` (mode) | [详细文档](initialize-mode.md) |
|
| `Initialize` (mode) | [详细文档](initialize-mode.md) |
|
||||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
| `Shutdown` | [详细文档](../../swap-chain/shutdown.md) |
|
||||||
| `Present` | [详细文档](present.md) |
|
| `Present` | [详细文档](present.md) |
|
||||||
| `SwapBuffers` | [详细文档](swap-buffers.md) |
|
| `SwapBuffers` | [详细文档](swap-buffers.md) |
|
||||||
| `Resize` | [详细文档](../../../containers/array/resize.md) |
|
| `Resize` | [详细文档](../../../containers/array/resize.md) |
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
| `GetWidth` / `GetHeight` | [详细文档](../../buffer/get-size.md) |
|
| `GetWidth` / `GetHeight` | [详细文档](../../buffer/get-size.md) |
|
||||||
| `GetFramebufferWidth` / `GetFramebufferHeight` | [详细文档](get-framebuffer-size.md) |
|
| `GetFramebufferWidth` / `GetFramebufferHeight` | [详细文档](get-framebuffer-size.md) |
|
||||||
| `GetWindow` | [详细文档](get-window.md) |
|
| `GetWindow` | [详细文档](get-window.md) |
|
||||||
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
|
| `GetNativeHandle` | [详细文档](../../swap-chain/get-native-handle.md) |
|
||||||
|
|
||||||
## 相关文档
|
## 相关文档
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user