38 VizWindow(
const std::string& title,
int width,
int height);
43 [[nodiscard]]
const std::vector<VizFontFile>&
fonts()
const {
return fonts_; }
55 void run(
const std::function<
void()>& draw_frame);
63 void run(
const std::function<
void()>& draw_frame,
const std::function<
void(
int,
int)>& after_render);
70 std::vector<VizFontFile> fonts_;
Owns a GLFW window, OpenGL3 context, and ImGui/ImPlot context for the lifetime of one demo app....
Definition window.hpp:30
VizWindow & operator=(const VizWindow &)=delete
VizWindow(const std::string &title, int width, int height, const VizFontOptions &fonts)
The same, with chosen fonts. The three-argument form uses DefaultVizFontOptions(): ImGui's default fo...
const std::vector< VizFontFile > & fonts() const
The fonts merged into the default font, in priority order.
Definition window.hpp:43
void run(const std::function< void()> &draw_frame)
Runs the main loop, calling draw_frame() once per frame between ImGui::NewFrame()/ImGui::Render(),...
VizWindow(const VizWindow &)=delete
void run(const std::function< void()> &draw_frame, const std::function< void(int, int)> &after_render)
Same as run(draw_frame), plus after_render(framebuffer_width, framebuffer_height) called once per fra...
void request_close()
Asks the main loop to exit after the current frame (e.g. a scripted/screenshot run).
VizWindow(const std::string &title, int width, int height)
Creates the GLFW window, OpenGL3 context, and ImGui/ImPlot contexts.
Fonts for the ImGui windows that cover every script: the default font first, then system fonts merged...
Definition acquisition_functions.hpp:16
Which fonts a VizWindow loads.
Definition fonts.hpp:20