HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
gfx_system.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "gfx_device.hpp"
8#include "../unfair_recursive_mutex.hpp"
9#include "../subsystem.hpp"
10#include <span>
11#include <memory>
12#include <mutex>
13#include <thread>
14#include <vector>
15
16namespace tt {
17class gfx_surface;
18
22public:
25
26 gfx_system() noexcept;
27
28 virtual ~gfx_system();
29
30 gfx_system(const gfx_system &) = delete;
31 gfx_system &operator=(const gfx_system &) = delete;
32 gfx_system(gfx_system &&) = delete;
33 gfx_system &operator=(gfx_system &&) = delete;
34
38 virtual void init() {};
39 virtual void deinit() {};
40
41 [[nodiscard]] virtual std::unique_ptr<gfx_surface> make_surface(os_handle instance, void *os_window) const noexcept = 0;
42
43 gfx_device *find_best_device_for_surface(gfx_surface const &surface);
44};
45
46}
Graphics system.
Definition gfx_system.hpp:21
std::vector< std::shared_ptr< gfx_device > > devices
List of all devices.
Definition gfx_system.hpp:24
virtual void init()
Initialize after construction.
Definition gfx_system.hpp:38