docs: update RHI API docs
This commit is contained in:
26
docs/api/rhi/opengl/device/get-native-handle.md
Normal file
26
docs/api/rhi/opengl/device/get-native-handle.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# OpenGLDevice::GetNativeHandle
|
||||
|
||||
```cpp
|
||||
void* GetNativeHandle() const
|
||||
```
|
||||
|
||||
获取原生窗口或渲染上下文句柄。
|
||||
|
||||
**返回:** `void*` - 原生句柄(当前实现返回 `nullptr`)
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**注意:** 此方法当前实现返回 `nullptr`。使用 `GetWindow()` 获取 GLFW 窗口指针。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
void* handle = device.GetNativeHandle();
|
||||
// 注意:当前实现返回 nullptr
|
||||
GLFWwindow* window = device.GetWindow(); // 使用此方法获取窗口
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLDevice](device.md) - 返回类总览
|
||||
- [GetWindow](get-window.md) - 获取 GLFW 窗口指针
|
||||
Reference in New Issue
Block a user