Monday 16 July 2018

Have you heard of "ImGui"?

Hello, everyone! This short post won't be about graphics, however, it may be very useful to everyone who develops 2D/3D applications. I'd like to show you one cool and handy thing - ImGui. "What's that?" you may ask. Well, it is an "Immediate Mode Graphical User interface for C++ with minimal dependencies" :) Some of you are already familiar with it, but if you are not, I will quickly go through its main features!

ImGui in my "EveryRay - Rendering Engine"

Is your current UI text-based? Are you binding 75 key combinations to simple actions? Then maybe you should consider integrating a simple GUI framework into your environment! And ImGui is a perfect candidate for that! It is very compact and lightweight, it has a lot of functionalities already developed and, most importantly, it is free and pretty easy to integrate if you know your codebase! You can read about it in details on the GitHub page (here), but I will just mention some of the features it has out of the box. Button bindings, text editing, color picking, list selection, image loading, sliders, plot generation and many more! You can also customize your windows by dragging, resizing, changing color and other properties. ImGui sends draw calls in an optimal way so your performance will not drop radically! Moreover, you can call ImGui from any part of your code.


Just look at my previous post about Cascaded Shadow Mapping and you will see how boring my UI was there. And now look at the image above again - that is how my demo looks now! I hope I have convinced you:)

Links:
1) https://github.com/ocornut/imgui

No comments:

Post a Comment