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

27 lines
517 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::GetFramebufferWidth
```cpp
int GetFramebufferWidth() const;
```
获取帧缓冲区宽度。
**返回:** 帧缓冲区宽度(像素)
**线程安全:**
**注意:**
- 帧缓冲区大小可能与窗口大小不同HiDPI 显示)
- 通过 `glfwGetFramebufferSize` 获取
**示例:**
```cpp
int fbWidth = swapChain->GetFramebufferWidth();
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md)
- [GetFramebufferHeight](get-framebuffer-height.md) - 获取帧缓冲高度