pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
607 stars 91 forks source link

Like it or not? Feedback welcome here #1

Open pthom opened 4 years ago

pthom commented 4 years ago

Constructive feedback is always welcome!

meshula commented 4 years ago

Nice work! Would be nice to have the ImGui Metal backend enabled as well.

pthom commented 4 years ago

Nice work! Would be nice to have the ImGui Metal backend enabled as well.

Thanks! I will have a look at metal. It's a bit complex, since it requires additional tweaking for the storyboards.

However the doc in imgui_impl_osx.h inside ImGui repo advises to prefer SDL or GLFW on Mac.

meshula commented 4 years ago

That statement in the comment is very true ~ Metal isn't portable but OpenGL is. Sadly Apple's deprecation of OpenGL makes the imgui_impl_osx.h advice not so great as time goes on!

Anyway, thanks again for putting your project together!

pthom commented 4 years ago

Another demo with Hello ImGui, showcasing implot is available here image

The source code for the demo is at: https://github.com/pthom/implot_demo

It was introduced in this issue

chengts95 commented 4 years ago

Very nice work for rapid C++ GUI developments. I think a Vulkan backend can be useful since it can run on all platforms including the macOS with MoltenVK.

pthom commented 4 years ago

Very nice work for rapid C++ GUI developments. I think a Vulkan backend can be useful since it can run on all platforms including the macOS with MoltenVK.

Thanks! Concerning Vulkan, I do not have experience on this framework. I know it is quite more complex than OpenGL. Let's hope someone helps on this in the future!

frink commented 3 years ago

Dear Imgui is a beautiful piece of code that deserves much more love than it gets, it's mature and poised to become the backbone of a modern, liberally licensed, general application framework. You've done a great job with the cross platform scaffolding and I'm curious if you plan to add any other components like notifications, screen rotation, camera access, or audio. I know that any framework can become a bottomless pit and each project has to draw the line somewhere. I'm curious about your thoughts...

pthom commented 3 years ago

You've done a great job with the cross platform scaffolding and I'm curious if you plan to add any other components like notifications, screen rotation, camera access, or audio. I know that any framework can become a bottomless pit and each project has to draw the line somewhere. I'm curious about your thoughts...

Many thanks (and sorry for the delay, I was on holiday)! My original intent when working on this project was to provide a jump start framework for rapid prototyping of research and computer vision applications, especially on mobile platforms.

So let me answer straight. I would like to add the following features to the project:

Notifications, Audio & screen rotation are not on my main list at the moment (but I welcome PR in that direction).

frink commented 3 years ago

Great thanks. I'm looking at this as a rapid prototype framework as well. (My use case is cross platform audio applications...)

Having thought about this for a while, I think audio should remain separate to to keep it lean and allow more choice... (MiniAudio and SoLoud are probably the best paring - both MIT/Zlib license)

If you're going to do gyro access then screen rotation is probably trivial once you get there. The resizability on web targets already proves that resizing should not be difficult. I imagine we'll see a Gist on this before this thing is overly mature.

pthom commented 3 years ago

I actually think the same about camera and gyro access: a separate repo is a better idea. I think I will create an external project that would allow camera and gyro access, and that will use this project as a submodule.

frink commented 3 years ago

BTW: I notice the Sokol Dear Imgui Demo produce WASM binaries are a magnitude smaller... (523kb vs 1.4Mb) My guess is that's because of SDL is heavy compared to Sokol. But that's about a 3-4 seconds savings in startup which is very a big deal on the web...

BigBIueWhale commented 1 year ago

When comparing this GUI framework to QT and wxWidgets a few thoughts come to mind: Hello ImGui is more portable, less bloated and more powerful than any of those options. This project is now my go-to answer when beginners ask me how to create a "hello world" graphical project in C++. At the same time, this project is my go-to solution when I need to create a professional realtime visualization software for an electronics instruments company. Being able to set up a C++ GUI project with 6 lines of code is something that has never existed before, an innovation. To put this into perspective: QT charges a minimum of $302 per developer per month, whereas this library is MIT and is totally better than QT. With this library I can use the IDE of my choice, and it doesn't take over my code. QT is so evil, wxWidgets is a hassle to set up and it's so bloated and buggy. This project is now only professionally executed with documentation and everything, but is also totally called for and necessary in this day and age of web taking over everything.

JunedKhan101 commented 12 months ago

Maybe we can do something with Imgui File Dialog? like reading a file that has file content "Hello World" and printing it into the imgui window.

pthom commented 12 months ago

@JunedKhan101 : Hello ImGui does not include ImGui file dialog. However Dear ImGui Bundle which is based on it provides it, as well as many widgets. You might want to take look at it.

andriii25 commented 11 months ago

I needed to make a quick GUI to inspect some of my research results and this (bundled with Dear ImGui Bundle), made my life so much easier. Two things that would make it even better for me:

sphaero commented 3 months ago

I've been playing with hello_imgui. I really like the ambition of this project. To provide feedback; I had a hard time mixing it with the workflow of Dear ImGui. Dear ImGui is programmed in C++ but has a more C-like no-nosense API. Hello ImGui has a very C++/OO API which feels very alien when compared to Dear ImGui. So although it's handy to jumpstart when I need more specifics I tempt to move back to the Dear ImGui examples and work from there then to jump into the abstractions of Hello ImGui. I would have liked the Hello ImGui to follow the same paradigm as Dear imGui because I think that's where the strength is. But that's just my 2 cents.

pthom commented 2 months ago

I've been playing with hello_imgui. I really like the ambition of this project.

Hello, and thank you for your feedback!

Hello ImGui has a very C++/OO API which feels very alien when compared to Dear ImGui. So although it's handy to jumpstart when I need more specifics I tempt to move back to the Dear ImGui examples and work from there then to jump into the abstractions of Hello ImGui. I would have liked the Hello ImGui to follow the same paradigm as Dear imGui because I think that's where the strength is. But that's just my 2 cents.

I can understand your point. However, I would not say that Hello ImGui uses an object oriented API: all the parameters you see in the API are just Plain Old Data structs, with no methods and no inheritance whatsoever.

The difference from Dear ImGui is that RunnerCallbacks uses C++ function pointers instead of C function pointers. This is to address the standard shortcomings of C functions pointers (where no context can be passed, except may be with a void* pointer, which I really wanted to avoid).