Update API documentation and remove obsolete plan files
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
| [`CreateRenderWindow`](create-render-window.md) | 创建渲染窗口 |
|
||||
| [`InitializeWithExistingWindow`](initialize-with-existing-window.md) | 使用现有窗口初始化 |
|
||||
| [`GetWindow`](get-window.md) | 获取 GLFW 窗口指针 |
|
||||
| [`GetDC`](get-dc.md) | 获取 Windows 设备上下文 |
|
||||
| [`GetContext`](get-context.md) | 获取 OpenGL 渲染上下文 |
|
||||
| [`GetDeviceInfoImpl`](get-device-info-impl.md) | 获取设备信息实现 |
|
||||
| [`SwapBuffers`](swap-buffers.md) | 交换前后缓冲区 |
|
||||
| [`PollEvents`](poll-events.md) | 处理窗口事件 |
|
||||
|
||||
31
docs/api/rhi/opengl/device/get-context.md
Normal file
31
docs/api/rhi/opengl/device/get-context.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# OpenGLDevice::GetContext
|
||||
|
||||
获取 OpenGL 渲染上下文(Rendering Context)。
|
||||
|
||||
```cpp
|
||||
HGLRC GetContext() const;
|
||||
```
|
||||
|
||||
返回 OpenGL 渲染上下文的句柄。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** `HGLRC` - OpenGL 渲染上下文句柄
|
||||
|
||||
**线程安全:** ❌
|
||||
|
||||
**注意:** 此方法返回原生 OpenGL 渲染上下文句柄,可用于 `wglShareLists`、`wglMakeCurrent` 等原生 OpenGL 上下文操作。大多数情况下不需要直接使用此方法。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
HGLRC hglrc = device.GetContext();
|
||||
// 可以使用 hglrc 进行原生 OpenGL 上下文操作
|
||||
HGLRC currentContext = wglGetCurrentContext();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLDevice 总览](device.md) - 返回类总览
|
||||
- [GetDC](get-dc.md) - 获取 Windows 设备上下文
|
||||
- [GetWindow](get-window.md) - 获取 GLFW 窗口指针
|
||||
31
docs/api/rhi/opengl/device/get-dc.md
Normal file
31
docs/api/rhi/opengl/device/get-dc.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# OpenGLDevice::GetDC
|
||||
|
||||
获取 OpenGL 设备的设备上下文(Device Context)。
|
||||
|
||||
```cpp
|
||||
HDC GetDC() const;
|
||||
```
|
||||
|
||||
返回与 OpenGL 渲染上下文关联的 Windows 设备上下文句柄。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** `HDC` - Windows 设备上下文句柄
|
||||
|
||||
**线程安全:** ❌
|
||||
|
||||
**注意:** 此方法返回原生 Windows HDC,可用于低级 GDI 操作或与原生 Windows OpenGL 上下文交互。大多数情况下不需要直接使用此方法。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
HDC hdc = device.GetDC();
|
||||
// 可以使用 hdc 进行原生 Windows OpenGL 操作
|
||||
HDC currentDC = wglGetCurrentDC();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLDevice 总览](device.md) - 返回类总览
|
||||
- [GetContext](get-context.md) - 获取 OpenGL 渲染上下文
|
||||
- [GetWindow](get-window.md) - 获取 GLFW 窗口指针
|
||||
Reference in New Issue
Block a user