Skip to content

Commit

Permalink
Backends, Viewport: Metal: Pull format from shared context. (#5403, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
stack authored and ocornut committed Jun 30, 2022
1 parent 5d0deeb commit ad5aa54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/imgui_impl_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ad5aa54

Please sign in to comment.