Skip to content

Assert when shutting down and recreating backend #2769

@metarutaiga

Description

@metarutaiga

Version/Branch of Dear ImGui:

Version: 1.73
Branch: viewport

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_win32.cpp
Compiler: msvc_v142
Operating System: win10

My Issue/Question:

I implement a graphic library that it can change APIs in runtime.
But it always assert when recreating imgui.
I modified it below, but it's not a good method.
Has any good idea to resolve this assert?

Standalone, minimal, complete and verifiable example:
-- ImGuiViewport* main_viewport = ImGui::GetMainViewport();
++ ImGuiViewportP* main_viewport = (ImGuiViewportP*)ImGui::GetMainViewport();
++ main_viewport->PlatformWindowCreated = true;

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions