Skip to content

Conversation

tonitch
Copy link
Contributor

@tonitch tonitch commented Aug 24, 2025

As previously discussed on discord, switching to using cimgui instead of wrapping every function of imgui manually might be a good idea.

By doing so, updating to the last imgui version should only be a matter of updating the commit hash in build.zig.zon while every single method is already wrapped and can be exposed to the users that would need really specific needs without having to make a pr.

Currently, this PR is not in a usable state at all. I put it here as a WIP (it compiles tho) so that if people want to have a look and give opinions they are welcome to do so.

My current thought is, to go in two steps to avoid defacing the whole project.

  1. keeping the api and replacing all the previously wrapped function by cimgui functions. This should not break any previous project and allow to extensively test if there is no problems included by this change.
  2. as time goes on. Some functions will obviously be obsolete. I noticed quite a lot already. I would do a brand new wrapper mimicking the one from zopengl while depreciating the current one as time goes on.

Any comments are welcome. I'll work on that at my own pace, as I might not have so much time.

Anthony Debucquoy added 6 commits September 1, 2025 22:12
there muse be a lot of problem now but it requires test. it's also way
faster
@tonitch tonitch marked this pull request as ready for review September 5, 2025 10:31
@tonitch
Copy link
Contributor Author

tonitch commented Sep 5, 2025

I believe this branch is now in a usable state.
As previously stated, I tried not to touch the API too much to allow it to be a "drop in" experience. Although, some function's signature has changed a bit to accommodate this branch.
I have made some test on my own, but I don't have any "big" project to test it against, so feel free to give your review here

Also, this branch now uses imgui 1.92.1 which is what #51 is doing as well. Maybe @kcbanner you could give me your opinion? Currently, I haven't really added any new features of this imgui versions. So your input would be great.

I also added some zig 0.5.1 compatibility that was probably forgotten.

@tonitch tonitch changed the title WIP: Replacing imgui to c homemade wrapper by cimgui Replacing imgui to c homemade wrapper by cimgui Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant