#9501·imgui

金属:无法在次级视口窗口上控制 vsync (displaySyncEnabled) (API 建议)

作者: lailoken创建于 2026年8月4日更新于 2026年9月1日
标签backendsosx/iosmulti-viewports

// Set CAMetalLayer.displaySyncEnabled for secondary viewport windows created by the backend. // macOS only: no-op on other Apple platforms. IMGUI_IMPL_API void ImGui_ImplMetal_SetDisplaySyncEnabled(bool enabled); The implementation I'm running: the flag lives in ImGui_ImplMetal_Data (per-context, default true = CAMetalLayer's default); the setter applies it to existing secondary viewport layers and Renderer_CreateWindow applies it to new ones: