Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Dear ImGui support explicit multiple contexts used in parallel #5856

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Nov 28, 2023

  1. Configuration menu
    Copy the full SHA
    5ecc29d View commit details
    Browse the repository at this point in the history
  2. pre-generation: Remove DebugAllocHook from MemAlloc and MemFree

    --
    This commit is a preparation toward adding ImGui apis with explicit context
    and making ImGui applications being able to use multiple context at the same time
    whatever their concurrency model.
    --
    
    DebugAllocHook forces MemAlloc and MemFree to be dependent on ImGuiContext.
    In the scenario where the context need to be explicit, it means forward the
    context to every MemAlloc and MemFree calls. This sounds cumbersome.
    
    Instead, this commit remove the use of DebugAllocHook to make MemAlloc and
    MemFree independent from ImGuiContext.
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    eec2b43 View commit details
    Browse the repository at this point in the history
  3. pre-generation: Make ImGui::ShowFontAtlas be a public API

    --
    This commit is a preparation toward adding ImGui apis with explicit context
    and making ImGui applications being able to use multiple context at the same time
    whatever their concurrency model.
    --
    
    imgui_demo.cpp forward declare ImGui::ShowFontAtlas because it does not to
    include imgui_internal.h.
    The fact ImGui::ShowFontAtlas is not a public API but can be used in
    user code (e.g imgui_demo.cpp) add an unecessary corner case to the
    conversion from implicit context to explicit context. Instead of
    dealing with this corner case, I am suggested to have ImGui::ShowFontAtlas
    become a regular public API
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    65ea0d1 View commit details
    Browse the repository at this point in the history
  4. [generated] Convert Dear ImGui API to use an explicit ImGuiContext.

    This commit has been generated by the make_explicit_imgui.py script available
    in the https://github.com/Dragnalith/make_explicit_imgui/ repository.
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    5560f2a View commit details
    Browse the repository at this point in the history
  5. post-generation: Remove global ImGuiContext

    --
    This commit is part of the conversion of Dear ImGui toward explicit context API.
    This commit is supposed to be applied *after* make_explicit_imgui.py has been run.
    --
    
    foo
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    4801b80 View commit details
    Browse the repository at this point in the history
  6. post-generation: Remove OnceUponAFrame helper

    This helper makes the assumption only one global context in the application.
    It is not compatible with a Dear ImGui version where the context is explicit.
    
    --
    This commit is part of the conversion of Dear ImGui toward explicit context API.
    This commit is supposed to be applied *after* make_explicit_imgui.py has been run.
    --
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    b250199 View commit details
    Browse the repository at this point in the history
  7. post-generation: Fix corner cases related to API conversion to explic…

    …it context
    
    Some corner case need to be converted by hand:
    - API which already had explicit context overload need to be removed
    - Function call defined in preprocessor define are not handled by the script
    - Style init function
    - API defined in code compiled out because of `#if ... #endif`
    
    --
    This commit is part of the conversion of Dear ImGui toward explicit context API.
    This commit is supposed to be applied *after* make_explicit_imgui.py has been run.
    --
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    58915c2 View commit details
    Browse the repository at this point in the history
  8. post-generation: Convert Win32 backend to use explicit context API

    --
    This commit is part of the conversion of Dear ImGui toward explicit context API.
    This commit is supposed to be applied *after* make_explicit_imgui.py has been run.
    --
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    c336836 View commit details
    Browse the repository at this point in the history
  9. post-generation: Convert DX12 backend to use explicit context API

    --
    This commit is part of the conversion of Dear ImGui toward explicit context API.
    This commit is supposed to be applied *after* make_explicit_imgui.py has been run.
    --
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    65f3b52 View commit details
    Browse the repository at this point in the history
  10. post-generation: Convert DX12 example to use explicit context API

    --
    This commit is part of the conversion of Dear ImGui toward explicit context API.
    This commit is supposed to be applied *after* make_explicit_imgui.py has been run.
    --
    Dragnalith committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    6d6b190 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6743576 View commit details
    Browse the repository at this point in the history