ReXGlue SDK
Loading...
Searching...
No Matches
driver.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <memory>
14#include <string_view>
15
16#include <rex/platform.h>
17#include <rex/result.h>
18#include <rex/types.h>
19
20namespace rex {
21
22class IDriverContext;
23
25enum class GraphicsFamily : u8 {
26 kNone,
27 kXenos,
28};
29
31[[nodiscard]] REX_API std::string_view GetGraphicsFamilyName(GraphicsFamily family);
32
33enum class DriverType : u8 {
37 kUI,
38};
39
41class IDriver {
42 public:
43 virtual ~IDriver() = default;
44
48 virtual std::string_view GetName() const = 0;
49
56 [[nodiscard]] virtual Result<void> Initialize(IDriverContext& context) = 0;
57
59 virtual void Shutdown() = 0;
60};
61
62} // namespace rex
Definition driver_context.h:23
Definition driver.h:41
virtual void Shutdown()=0
virtual std::string_view GetName() const =0
virtual Result< void > Initialize(IDriverContext &context)=0
Definition app.h:36
DriverType
Definition driver.h:33
@ kGraphics
Definition driver.h:34
@ kAudio
Definition driver.h:35
@ kInput
Definition driver.h:36
GraphicsFamily
Definition driver.h:25
std::string_view GetGraphicsFamilyName(GraphicsFamily family)
std::expected< T, Error > Result
Definition result.h:98
Platform flags, packing macros and export markers.
#define REX_API
Definition platform.h:177
Integer types, byte order wrappers and size literals.