Skip to content

Commit

Permalink
post-generation: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragnalith committed Jan 14, 2024
1 parent 207f088 commit c34788b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
Fork of Dear ImGui: Introducing Explicit Context
=====


This repository is a fork of [Dear ImGui](https://github.com/ocornut/imgui). In this fork, the state of Dear ImGui (instance of `ImGuiContext`) is not global and implicit and anymore. It has to be forwarded as first argument of every API call.

Original Dear ImGui:
```cpp
bool state;
ImGui::Begin("My Window");
ImGui::Button("My Button", &state);
ImGui::End();
```
This Fork:
```cpp
ImGuiContext* ctx = ImGui::CreateContext();
bool state;
ImGui::Begin(ctx, "My Window");
ImGui::Button(ctx, "My Button", &state);
ImGui::End(ctx);
```

### Details

You can follow the conversation about this work in [PR-5856](https://github.com/ocornut/imgui/pull/5856).

The branch has been partial generated using [make_explicit_imgui.py](https://github.com/Dragnalith/make_explicit_imgui/) scripts. You can easily rebase this branch on another version of Dear Imgui's branch using that script (see more explanation on the [README](https://github.com/Dragnalith/make_explicit_imgui/tree/main#readme) of the script repository)

### Compatibility

Not all backend have been ported to the explicit context version of the API. Status:
- [x] Win32
- [ ] OSX
- [ ] Android
- [ ] GLFW
- [ ] GLUT
- [ ] SDL 2
- [ ] SDL 3
- [ ] Allegro 5
- [x] DirectX 12
- [ ] DirectX 11
- [ ] DirectX 10
- [ ] DirectX 9
- [ ] OpenGL 2
- [ ] OpenGL 3
- [ ] Vulkan
- [ ] Metal
- [ ] SDL Renderer 3
- [ ] SDL Renderer 2
- [ ] WGPU

-------

Dear ImGui
=====

Expand Down

0 comments on commit c34788b

Please sign in to comment.