Skip to content

Metal backend: secondary viewports are not rendered #6015

@dmirty-kuzmenko

Description

@dmirty-kuzmenko

Version: 18916
Branch: docking
Backend: imgui_impl_metal.mm + (imgui_impl_sdlrenderer.cpp or imgui_impl_glfw.cpp or imgui_impl_osx.mm)
Operating System: macOS 12.5 (monterey)

My Issue/Question:

The following happens even with example code provided by this repo.
On the docking branch with metal backend "child" windows are not rendered if they are outside of the main window (or some part of them is outside, for example a popup or something). Depending on the implementation (sdl vs glfw vs osx) they either completely greyed out or not shown at all. In terminal I get [CAMetalLayer nextDrawable] returning nil because device is nil. every frame.

Replacing line id<MTLDevice> device = [bd->SharedMetalContext.depthStencilState device]; in the imgui_impl_metal.mm file with id<MTLDevice> device = bd->SharedMetalContext.device; fixes the issue (shown on the video), but I did not investigate this "fix" seriously.

Screenshots/Video
imgui

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions