Monado OpenXR Runtime
|
Small GUI interface to configure Monado based on SDL2. More...
Files | |
file | gui_common.h |
Common file for the Monado GUI program. | |
file | gui_imgui.h |
Imgui integration for gui. | |
file | gui_ogl.c |
OpenGL functions to drive the gui. | |
file | gui_scene.cpp |
SDL2 functions to drive the GUI. | |
file | gui_scene_calibrate.c |
Calibration gui scene. | |
file | gui_scene_debug.c |
A debugging scene. | |
file | gui_scene_main_menu.c |
Main menu. | |
file | gui_scene_video.c |
A very small scene that lets the user select a video device. | |
file | gui_sdl2.c |
SDL2 functions to drive the GUI. | |
file | gui_sdl2.h |
Common file for the Monado SDL2 based GUI program. | |
file | gui_sdl2_imgui.c |
Main entrypoint for the Monado GUI program. | |
file | gui_sdl2_main.c |
Main entrypoint for the Monado GUI program. | |
Data Structures | |
struct | gui_program |
A gui program. More... | |
struct | gui_ogl_texture |
A OpenGL texture. More... | |
struct | sdl2_program |
Common struct holding state for the GUI interface. More... | |
struct | gui_imgui |
Internal gui state. More... | |
Functions | |
int | gui_prober_init (struct gui_program *p) |
Initialize the prober and open all devices found. More... | |
int | gui_prober_select (struct gui_program *p) |
Create devices. More... | |
void | gui_prober_update (struct gui_program *p) |
Update all devices. More... | |
void | gui_prober_teardown (struct gui_program *p) |
Destroy all opened devices and destroy the prober. More... | |
struct gui_ogl_texture * | gui_ogl_sink_create (const char *name, struct xrt_frame_context *xfctx, struct xrt_frame_sink **out_sink) |
Create a sink that will turn frames into OpenGL textures, since the frame can come from another thread gui_ogl_sink_update needs to be called. More... | |
void | gui_ogl_sink_update (struct gui_ogl_texture *) |
Update the texture to the latest received frame. More... | |
void | gui_scene_push_front (struct gui_program *p, struct gui_scene *me) |
Push the scene to the top of the lists. More... | |
void | gui_scene_delete_me (struct gui_program *p, struct gui_scene *me) |
Put a scene on the delete list, also removes it from any other list. More... | |
void | gui_scene_manager_render (struct gui_program *p) |
Render the scenes. More... | |
void | gui_scene_manager_init (struct gui_program *p) |
Initialize the scene manager. More... | |
void | gui_scene_manager_destroy (struct gui_program *p) |
Destroy the scene manager. More... | |
void | gui_scene_main_menu (struct gui_program *p) |
Shows the main menu. More... | |
void | gui_scene_select_video_calibrate (struct gui_program *p) |
Shows a UI that lets you select a video device and mode for calibration. More... | |
void | gui_scene_debug (struct gui_program *p) |
Regular debug UI. More... | |
void | gui_scene_calibrate (struct gui_program *p, struct xrt_frame_context *xfctx, struct xrt_fs *xfs, struct xrt_settings_tracking *s) |
Given the frameserver runs the calibration code on it. More... | |
int | gui_sdl2_init (struct sdl2_program *p) |
Init SDL2, create and show a window and bring up any other structs needed. More... | |
void | gui_sdl2_imgui_loop (struct sdl2_program *p) |
Loop until user request quit and show Imgui interface. More... | |
void | gui_sdl2_loop (struct sdl2_program *p) |
Loop until quit signal has been received. More... | |
void | gui_sdl2_quit (struct sdl2_program *p) |
Destroy all SDL things and quit SDL. More... | |
Small GUI interface to configure Monado based on SDL2.
struct gui_ogl_texture* gui_ogl_sink_create | ( | const char * | name, |
struct xrt_frame_context * | xfctx, | ||
struct xrt_frame_sink ** | out_sink | ||
) |
#include <state_trackers/gui/gui_common.h>
Create a sink that will turn frames into OpenGL textures, since the frame can come from another thread gui_ogl_sink_update needs to be called.
Destruction is handled by the frame context.
References xrt_frame_sink::push_frame, gui_ogl_sink::sink, and U_TYPED_CALLOC.
void gui_ogl_sink_update | ( | struct gui_ogl_texture * | ) |
#include <state_trackers/gui/gui_common.h>
Update the texture to the latest received frame.
References container_of, xrt_frame::data, xrt_frame::format, gui_ogl_sink::frame, gui_ogl_texture::h, gui_ogl_texture::half, xrt_frame::height, gui_ogl_sink::mutex, gui_ogl_texture::seq, xrt_frame::source_sequence, gui_ogl_texture::w, xrt_frame::width, and XRT_FORMAT_R8G8B8.
int gui_prober_init | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Initialize the prober and open all devices found.
References time_state::time_state_create(), gui_program::timekeeping, gui_program::xp, and xrt_prober_create().
Referenced by main().
int gui_prober_select | ( | struct gui_program * | p | ) |
void gui_prober_teardown | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Destroy all opened devices and destroy the prober.
References xrt_device::destroy, NUM_XDEVS, time_state::time_state_destroy(), gui_program::timekeeping, and gui_program::xdevs.
Referenced by main().
void gui_prober_update | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Update all devices.
References NUM_XDEVS, time_state::time_state_get_now_and_update(), gui_program::timekeeping, xrt_device::update_inputs, and gui_program::xdevs.
Referenced by gui_sdl2_imgui_loop(), and oxr_sdl2_hack_stop().
void gui_scene_calibrate | ( | struct gui_program * | p, |
struct xrt_frame_context * | xfctx, | ||
struct xrt_fs * | xfs, | ||
struct xrt_settings_tracking * | s | ||
) |
#include <state_trackers/gui/gui_common.h>
Given the frameserver runs the calibration code on it.
Claims ownership of s
.
References calibration_scene::base, gui_scene::render, and U_TYPED_CALLOC.
void gui_scene_debug | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Regular debug UI.
References debug_scene::base, gui_scene::render, and U_TYPED_CALLOC.
Referenced by main(), and oxr_sdl2_hack_stop().
void gui_scene_delete_me | ( | struct gui_program * | p, |
struct gui_scene * | me | ||
) |
#include <state_trackers/gui/gui_common.h>
Put a scene on the delete list, also removes it from any other list.
References gui_program::gsm, and gui_scene_manager::scenes.
void gui_scene_main_menu | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Shows the main menu.
References main_menu::base, gui_scene::render, and U_TYPED_CALLOC.
Referenced by main().
void gui_scene_manager_destroy | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Destroy the scene manager.
References gui_program::gsm, and gui_scene_manager::scenes.
Referenced by main(), and oxr_sdl2_hack_stop().
void gui_scene_manager_init | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Initialize the scene manager.
References gui_program::gsm.
Referenced by main(), and oxr_sdl2_hack_stop().
void gui_scene_manager_render | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Render the scenes.
References gui_program::gsm.
Referenced by gui_sdl2_imgui_loop(), and oxr_sdl2_hack_stop().
void gui_scene_push_front | ( | struct gui_program * | p, |
struct gui_scene * | me | ||
) |
#include <state_trackers/gui/gui_common.h>
Push the scene to the top of the lists.
References gui_program::gsm, and gui_scene_manager::scenes.
void gui_scene_select_video_calibrate | ( | struct gui_program * | p | ) |
#include <state_trackers/gui/gui_common.h>
Shows a UI that lets you select a video device and mode for calibration.
Referenced by main().
void gui_sdl2_imgui_loop | ( | struct sdl2_program * | p | ) |
#include <targets/gui/gui_sdl2.h>
Loop until user request quit and show Imgui interface.
References xrt_colour_rgb_f32::b, sdl2_program::base, gui_imgui::clear, sdl2_program::ctx, xrt_colour_rgb_f32::g, gui_prober_update(), gui_scene_manager_render(), xrt_colour_rgb_f32::r, gui_imgui::show_demo_window, gui_program::stopped, u_var_add_root(), u_var_remove_root(), and sdl2_program::win.
Referenced by main().
int gui_sdl2_init | ( | struct sdl2_program * | p | ) |
#include <targets/gui/gui_sdl2.h>
Init SDL2, create and show a window and bring up any other structs needed.
References sdl2_program::ctx, sdl2_program::sdl_initialized, and sdl2_program::win.
Referenced by main().
void gui_sdl2_loop | ( | struct sdl2_program * | p | ) |
#include <targets/gui/gui_sdl2.h>
Loop until quit signal has been received.
References sdl2_program::base, and gui_program::stopped.
void gui_sdl2_quit | ( | struct sdl2_program * | p | ) |
#include <targets/gui/gui_sdl2.h>
Destroy all SDL things and quit SDL.
References sdl2_program::ctx, sdl2_program::sdl_initialized, and sdl2_program::win.
Referenced by main().