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.
25 lines
413 B
Markdown
25 lines
413 B
Markdown
# 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) - 返回类总览
|