40 verticalSync = std::make_unique<VerticalSync>(_handleVerticalSync,
this);
45 GUISystem_base(
const GUISystem_base &) =
delete;
46 GUISystem_base &operator=(
const GUISystem_base &) =
delete;
47 GUISystem_base(GUISystem_base &&) =
delete;
48 GUISystem_base &operator=(GUISystem_base &&) =
delete;
50 virtual void initialize() noexcept(false) = 0;
52 template<typename T, typename... Args>
53 T *makeWindow(Args &&... args)
55 auto window = std::make_unique<T>(std::forward<Args>(args)...);
56 auto window_ptr = window.get();
59 auto device = findBestDeviceForWindow(*window);
61 TTAURI_THROW(gui_error(
"Could not find a vulkan-device matching this window"));
75 device->render(displayTimePoint);
79 delegate->lastWindowClosed();
84 void handleVerticalSync(hires_utc_clock::time_point displayTimePoint)
86 render(displayTimePoint);
90 static void _handleVerticalSync(
void *data, hires_utc_clock::time_point displayTimePoint);
93 GUIDevice *findBestDeviceForWindow(Window
const &window);