Items with no label
3338 Discussions

I want to make a new app by reducing the Intel Realsense Viewer app, using C++ librealsense 2.16.1 how can I move this to the top?? thankyou!

czhen7
Novice
1,635 Views

0 Kudos
1 Solution
MartyG
Honored Contributor III
796 Views

Applications in the RealSense SDK such as the RealSense Viewer use a system called Imgui to generate the interface elements.

 

https://github.com/IntelRealSense/librealsense/issues/2450

 

If you open the Viewer script with the link below and do a 'find' search in the browser for the word "imgui" on the page to highlight all references to it, you can see how the Viewer script handles Imgui interface element setup.

 

https://github.com/IntelRealSense/librealsense/blob/master/tools/realsense-viewer/realsense-viewer.cpp

 

I am guessing by the image you provided that you want to simplify the display by not showing the rows above, such as the icon toolbar and the Add Source panel?

 

I do not have experience of programming the SDK's GUI. An analysis of the Viewer script though suggests how the panels may be being generated.

 

  • My speculation would be that the Add Source panel at the top is generated on line 309 with this instruction:

 

ImGui::Begin("Add Device Panel", nullptr, flags);

 

You could try deleting or commenting out that line and see how it affects the options panel layout.

 

https://github.com/IntelRealSense/librealsense/blob/master/tools/realsense-viewer/realsense-viewer.cpp#L309

 

  • I am guessing that the section that you want to show at the top has its initialization instruction on line 422,

ImGui::Begin("Control Panel", nullptr, flags | ImGuiWindowFlags_AlwaysVerticalScrollbar);

 

https://github.com/IntelRealSense/librealsense/blob/master/tools/realsense-viewer/realsense-viewer.cpp#L422

 

I apologize that I could not provide a clearer answer. I see that you have also posted this question on the GitHub, which is an excellent idea as the RealSense developers are located there. Good luck!

 

View solution in original post

2 Replies
czhen7
Novice
796 Views

屏幕快照 2019-01-27 01.11.11.png

0 Kudos
MartyG
Honored Contributor III
797 Views

Applications in the RealSense SDK such as the RealSense Viewer use a system called Imgui to generate the interface elements.

 

https://github.com/IntelRealSense/librealsense/issues/2450

 

If you open the Viewer script with the link below and do a 'find' search in the browser for the word "imgui" on the page to highlight all references to it, you can see how the Viewer script handles Imgui interface element setup.

 

https://github.com/IntelRealSense/librealsense/blob/master/tools/realsense-viewer/realsense-viewer.cpp

 

I am guessing by the image you provided that you want to simplify the display by not showing the rows above, such as the icon toolbar and the Add Source panel?

 

I do not have experience of programming the SDK's GUI. An analysis of the Viewer script though suggests how the panels may be being generated.

 

  • My speculation would be that the Add Source panel at the top is generated on line 309 with this instruction:

 

ImGui::Begin("Add Device Panel", nullptr, flags);

 

You could try deleting or commenting out that line and see how it affects the options panel layout.

 

https://github.com/IntelRealSense/librealsense/blob/master/tools/realsense-viewer/realsense-viewer.cpp#L309

 

  • I am guessing that the section that you want to show at the top has its initialization instruction on line 422,

ImGui::Begin("Control Panel", nullptr, flags | ImGuiWindowFlags_AlwaysVerticalScrollbar);

 

https://github.com/IntelRealSense/librealsense/blob/master/tools/realsense-viewer/realsense-viewer.cpp#L422

 

I apologize that I could not provide a clearer answer. I see that you have also posted this question on the GitHub, which is an excellent idea as the RealSense developers are located there. Good luck!

 

Reply