From ad5aa5416630059c9213a4cfe00a827c3991e964 Mon Sep 17 00:00:00 2001 From: "Stephen H. Gerstacker" Date: Thu, 30 Jun 2022 20:19:23 +0200 Subject: [PATCH] Backends, Viewport: Metal: Pull format from shared context. (#5403, #5437) --- backends/imgui_impl_metal.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/imgui_impl_metal.mm b/backends/imgui_impl_metal.mm index dd14b50161f0..043e9a9543ed 100644 --- a/backends/imgui_impl_metal.mm +++ b/backends/imgui_impl_metal.mm @@ -413,7 +413,7 @@ static void ImGui_ImplMetal_CreateWindow(ImGuiViewport* viewport) CAMetalLayer* layer = [CAMetalLayer layer]; layer.device = device; layer.framebufferOnly = YES; - layer.pixelFormat = MTLPixelFormatBGRA8Unorm; + layer.pixelFormat = bd->SharedMetalContext.framebufferDescriptor.colorPixelFormat; #if TARGET_OS_OSX NSWindow* window = (__bridge NSWindow*)handle; NSView* view = window.contentView;