Skip to content

Multi-viewports rendering artifacts with OpenGL backend on 1.86 #4832

@inanevin

Description

@inanevin

Version/Branch of Dear ImGui:

Version: Dear ImGui 1.86 (18600)
Branch: docking
#1542

Back-end/Renderer/Compiler/OS

Operating System: Windows 10 20H2
GLFW: 3.3.6

Relevant Config:
IMGUI_HAS_VIEWPORT
IMGUI_HAS_DOCK
io.ConfigFlags: 0x000000441
DockingEnable
ViewportsEnable
io.ConfigViewportsNodecoration
io.BackendFLags: 0x00001406
PlatformHasViewports
RendererHasViewports

** Issue **

Superb work on the library, been using it for couple years now without any problems. Recently, I have decided to enable multi-viewports support for my app, seeing how the docking branch has progressed so far. Unfortunately, the feature seems to mess up the whole IMGUI window rendering [see the screenshots below] and it is indeterministic as far as I can test so far.

I have thought this is some sort of a render target synchronization issue and might be due to my window creation & rendering pipeline, or my modifications to the Dear ImGui library (been using it in my custom engine), so I decided to download the latest docking branch 15b4a06, build the glfw3 + opengl3 demo and give it a try. Still the same issue persists.

Only change to the demo source code was simply creating 2-3 more windows with only a text within. Initially nothing is wrong, docking and viewports work. But when one starts to dock windows around, sometimes out of nowhere the screenshot below happens. This is all within the primary monitor, when testing the viewports on secondary monitor more problems seem to occur, but that's a place for another issue.

This is not a major problem for my current development, however it would have been a nice to have this feature in a stable manner, just like other parts of the library.

*** EDIT

Enabling transparent payload seems to help initially, but the issue comes back after playing with the demo for some time.

Screenshots/Video
viewports_1

Significant timestamps: 00:06 & 00:30

viewports_v.mp4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions