Files
XCEngine/docs/api/rhi/opengl/swap-chain/get-current-back-buffer-index.md
2026-03-20 02:35:45 +08:00

27 lines
618 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::GetCurrentBackBufferIndex
```cpp
uint32_t GetCurrentBackBufferIndex() const override;
```
获取当前后台缓冲区的索引。
**返回:** 始终返回 0OpenGL 交换链使用单一帧缓冲)
**线程安全:**
**注意:**
- OpenGL 交换链实现返回 0因为使用单一帧缓冲而非多缓冲
- 该方法继承自 `RHISwapChain` 抽象接口
**示例:**
```cpp
uint32_t index = swapChain->GetCurrentBackBufferIndex();
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md)
- [GetCurrentBackBuffer](get-current-back-buffer.md) - 获取当前后台缓冲区