Files
XCEngine/docs/api/rhi/opengl/swap-chain/initialize.md
ssdfasd b414bc5326 refactor(docs): Fix broken links across multiple modules
Fixed broken references:
- texture-import-settings: Fix 16 files referencing wrong overview filename
- math/rectint: Fix 9 method links (rectint-* → get*, contains, intersects)
- rhi/opengl/device: Fix 8 cross-references (opengl-* → */**)
- resources/mesh: Fix meshsection and vertexattribute links
- rhi/d3d12/sampler: Fix RHISampler reference path
- math/vector3: Fix projectonplane → project-on-plane
- rhi/opengl/command-list: Remove broken ClearFlag enum ref
- rhi/opengl/device: Create 2 new method docs (MakeContextCurrent, GetNativeContext)
- rhi/device: Fix device-info types reference

All 0 broken references remaining.
2026-03-26 02:41:00 +08:00

569 B

OpenGLSwapChain::Initialize

使用已存在的窗口初始化 OpenGL 交换链。

bool Initialize(OpenGLDevice* device, HWND window, int width, int height);

参数:

  • device - OpenGL 设备指针
  • window - Win32 窗口句柄
  • width - 窗口宽度
  • height - 窗口高度

返回: 成功初始化返回 true

示例:

OpenGLDevice device;
device.Initialize({});
OpenGLSwapChain swapChain;
swapChain.Initialize(&device, hwnd, 1280, 720);

相关文档