ReXGlue SDK
Toggle main menu visibility
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
20
namespace
rex
{
21
22
class
IDriverContext
;
23
25
enum class
GraphicsFamily
: u8 {
26
kNone,
27
kXenos,
28
};
29
31
[[nodiscard]]
REX_API
std::string_view
GetGraphicsFamilyName
(
GraphicsFamily
family);
32
33
enum class
DriverType
: u8 {
34
kGraphics
,
35
kAudio
,
36
kInput
,
37
kUI,
38
};
39
41
class
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
rex::IDriverContext
Definition
driver_context.h:23
rex::IDriver
Definition
driver.h:41
rex::IDriver::Shutdown
virtual void Shutdown()=0
rex::IDriver::GetName
virtual std::string_view GetName() const =0
rex::IDriver::Initialize
virtual Result< void > Initialize(IDriverContext &context)=0
rex
Definition
app.h:36
rex::DriverType
DriverType
Definition
driver.h:33
rex::DriverType::kGraphics
@ kGraphics
Definition
driver.h:34
rex::DriverType::kAudio
@ kAudio
Definition
driver.h:35
rex::DriverType::kInput
@ kInput
Definition
driver.h:36
rex::GraphicsFamily
GraphicsFamily
Definition
driver.h:25
rex::GetGraphicsFamilyName
std::string_view GetGraphicsFamilyName(GraphicsFamily family)
rex::Result
std::expected< T, Error > Result
Definition
result.h:98
platform.h
Platform flags, packing macros and export markers.
REX_API
#define REX_API
Definition
platform.h:177
result.h
types.h
Integer types, byte order wrappers and size literals.
rex
driver.h
Generated by
1.18.0