How to draw shapes on a window using ImGiu?
I've modified the "rs-align" example to capture a livestream from my depth-camera. I want to add graphical lines within my image to separate it into a 3x3 matrix. I believe I need to use ImGui for this, but I haven't been able to find any relevant examples. If someone could point me in the right direction I'd appreciate it.
-
Hi Djkurtz99r A list of Imgui draw commands that includes advice about custom rendering can be found in the section of the imgui.h librealsense file linked to below.
https://github.com/IntelRealSense/librealsense/blob/master/third-party/imgui/imgui.h#L1208
In regard to applying those instructions to a program: in addition to the Imgui code in rs-align.cpp there is a more detailed example of Imgui slider rendering code in rs-align-advanced.cpp
The librealsense file model-views.cpp provides a far more extensive illustration of Imgui programming. If you do a browser-page word find search for imgui at the page in the link below then you can browse through highlighted examples of Imgui code.
https://github.com/IntelRealSense/librealsense/blob/master/common/model-views.cpp
Please sign in to leave a comment.
Comments
1 comment