-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Feedback wanted: Expected refactor in 1.80: Moving backends files? Adding a imgui_tables.cpp file? #3513
Comments
+1 for the rename of Also +1 on the separation of files, it's a subjective topic of course, but in general I like having files be as small as possible whilst remaining as large as necessary to be coherent in and of themselves. imgui.cpp's 10k+ lines are hard enough to maneuver as is for me, so I'm all for some separation there. (even my plain vim editor takes a few seconds to open it :P) |
I'm in favor of all mentioned changes. |
Same here, the proposed changes seem acceptable. I'm a heavy user of example backend implementations and find them very useful to get a project up and running quickly. What I usually do is take core files + example backend + demo main and drop it into my source folder. Taking files from another sub-folder(s) is a non issue I say. |
I wasn't actually expecting to see backends being in EDIT: As for the |
+1 on both, you should probably leave the old example files and have them #include the new ones when IMGUI_DISABLE_OBSOLETE_FUNCTIONS is not defined so you don't instantly break everyone. |
|
In my experience git handles renaming fairly well there?
|
@ocornut I have seen git registering renamed files as deleted files (accompanied with an added file of the new name) if they have been both renamed AND moved to a different directory |
Looks all good to me! |
+1 on first idea!
That will really save time for newcomer My suggestion : Inside Inside example folder, just one i was not sure where to put prerequisites file so i put inside both. This will allow user to decide exactly which folder and files needs to be copied for integration. prerequisites.sh or prerequisites.txt: Cross Platform IDE:
Speaking of psychological side effects, this is how it works: Mostly new user searches on search engine with specific keywords: In this context, this is xyproblem as suggested in doc, people want's simple, fast, effective and minimalist visual controls like button,slider, label, filesystem access, charts and image viewer!!! but they don't know where to find it, so they will cherry pick 2-3 items from the search results, now if it runs by following certain steps as suggested in official doc or web-tutorials, it will be adopted. if anyone interested to understand how above thing works then just pick one library that "you have never used" before and try to download, install and integrate in one day. My suggestions: My suggestion tool: But why? Some embedded PCs like RaspberyPi project also requires Faster Gui. More than 1 million people actively involved in Machine learning filed alone. (According to you tube video views) |
Pushing WIP branch for backend moving in: |
(1) Moved all backends to backends/ in all branches now. |
I dont know if it will be enough for users to realize that they can use those imgui_impl_XXX files instead of writting their own ones. |
(2) I expect tables branch to be merged in master this week so I'll close this issue now. |
…DirectX12: Move ImGui::Render() call above the first barrier to clarify its lack of effect on the graphics pipe.
Looking for feedback on those topics. If you have opinions or concerns feel free to voice them :)
1. Moving backends?
For 1.80 we are currently considering moving the
examples/imgui_impl_xxx
files tobackends/imgui_impl_xxx
(orbackends/imgui_backend_xxx
even?). Initially those back-ends were added toexamples/
as a way to suggest that there are easy to adapt or write for custom user/engine needs. It was also a way to lower our responsability "this is just an example, tweak it".Nowadays:
examples/
DOES have the expected effect of passively encouraging my-custom-engine people to rewrite their own. I think this is now becoming counter productive, since it means some people are spending 2-3 days integrating dear imgui for the first time instead of the 30 minutes it should take, because they insist on reimplementing a back-end. When they do, their back-ends often have subtle issues they don't immediately notice. I've seen countless cases of people spending time reimplementing a back-end for their lightweight abstraction, only to scrap it and use the default back-ends eventually. It's absolutely counter-productive because 1) they would be better off starting with available back-ends, even if it means using multiple backends for portability (we should encourage/document that better: if a custom-engine is aimed to be portable, people can use multiple default backends!). 2) anyone can decide to rewrite the back-ends AFTER THE FACT and after they are acquainted with dear imgui, but there's no reason to do it day one.We're only talking about moving files here... I'm mostly interested in the psychological side effects of this change...
It should be a small, easy to document and convey, one-off project breaking change (e.g. change a file-path). Currently evaluating if it'd be a good occasion to break something else (e.g. explicit back-end context creation).
2. New source file: imgui_tables.cpp?
For 1.80 we are aiming to merge the
tables
branch intomaster
.Tables have been developed in imgui_widgets.cpp but seeing that it is now becoming a large file, I was thinking it would be sane to split it and move that code in imgui_tables.cpp. We will also aim to fully rewrite the git history so all tables developments goes directly into imgui_tables.cpp.
If possible I would like to avoid different branches using different files, in order to facilitate switching projects, so I would only do this change just prior to merging in master.
Similarly, for 1.90 (hopefully) I think I'd like to move docking code out of imgui.cpp and into imgui_docking.cpp
The text was updated successfully, but these errors were encountered: