Files
XCEngine/docs/api/rhi/opengl/swap-chain/get-native-handle.md
2026-03-20 02:35:45 +08:00

27 lines
542 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenGLSwapChain::GetNativeHandle
```cpp
void* GetNativeHandle() override;
```
获取 OpenGL 交换链的原生句柄。
**返回:** `nullptr`OpenGL 交换链不提供原生句柄)
**线程安全:**
**注意:**
- OpenGL 交换链基于 GLFW不直接提供 OpenGL 句柄
- 使用 `GetWindow()` 获取 GLFW 窗口指针
**示例:**
```cpp
void* handle = swapChain->GetNativeHandle();
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [GetWindow](get-window.md) - 获取 GLFW 窗口