diff --git a/backends/imgui_impl_metal.mm b/backends/imgui_impl_metal.mm index dd14b5016..043e9a954 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;