Files
XCEngine/docs/api/XCEngine/RHI/OpenGL/OpenGLSwapChain/SwapBuffers.md

26 lines
594 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::SwapBuffers()
```cpp
void SwapBuffers();
```
## 作用
直接调用窗口系统的缓冲交换函数。
## 当前实现行为
- 如果 `m_device` 非空,则执行 `::SwapBuffers(m_device->GetPresentationDC())`
- 不做额外 blit
- 不切换上下文
- 不处理同步策略
## 何时使用
这是比 [Present](Present.md) 更底层的调用。当前代码里真正对外暴露的统一入口仍然是 `Present()``SwapBuffers()` 更适合作为内部辅助方法或调试使用。
## 相关文档
- [Present](Present.md)
- [GetNativeHandle](GetNativeHandle.md)