Browse Source

Backends: Metal: fixed secondary viewport rendering. (#6015, #4821, #2778)

ocornut 2 years ago
parent
commit
42e166089a
2 changed files with 2 additions and 1 deletions
  1. 1 1
      backends/imgui_impl_metal.mm
  2. 1 0
      docs/CHANGELOG.txt

+ 1 - 1
backends/imgui_impl_metal.mm

@@ -415,7 +415,7 @@ static void ImGui_ImplMetal_CreateWindow(ImGuiViewport* viewport)
     void* handle = viewport->PlatformHandleRaw ? viewport->PlatformHandleRaw : viewport->PlatformHandle;
     IM_ASSERT(handle != nullptr);
 
-    id<MTLDevice> device = [bd->SharedMetalContext.depthStencilState device];
+    id<MTLDevice> device = bd->SharedMetalContext.device;
     CAMetalLayer* layer = [CAMetalLayer layer];
     layer.device = device;
     layer.framebufferOnly = YES;

+ 1 - 0
docs/CHANGELOG.txt

@@ -150,6 +150,7 @@ Docking+Viewports Branch:
   remapping list are docked on the left or top side of a split. (#6035)
 - Backends: OSX: fixed typo in ImGui_ImplOSX_GetWindowSize that would cause issues when resiing
   from OS decorations, if they are enabled on secondary viewports. (#6009) [@sivu]
+- Backends: Metal: fixed secondary viewport rendering. (#6015) [@dmirty-kuzmenko]
 
 
 -----------------------------------------------------------------------