ReXGlue SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics_system.h
Go to the documentation of this file.
1
10
11
#pragma once
12
13
#include <string>
14
15
#include <
rex/module.h
>
16
#include <
rex/platform.h
>
17
#include <
rex/setting.h
>
18
#include <
rex/settings_registry.h
>
19
#include <
rex/types.h
>
20
21
namespace
rex::gpu
{
22
23
struct
FrameStats
{
24
f64
frame_time_ms
= 0.0;
25
f64 fps = 0.0;
26
u64
frame_count
= 0;
27
};
28
29
class
REX_GPU_API
GraphicsSettings final :
public
SettingOwner
{
30
public
:
31
GraphicsSettings();
32
33
REX_SETTING(
34
std::string, driver,
"any"
,
35
"Graphics driver within the title's family. Values are d3d12, vulkan, null, none for no "
36
"driver in an app that does not require one, or any for d3d12 on Windows and vulkan "
37
"elsewhere"
,
38
kStartupOnly);
39
REX_SETTING(
bool
, vsync,
true
,
"Wait for vertical blank when presenting"
);
40
REX_SETTING(f64, frame_limit, 0.0,
"Most presents per second, 0 for no limit"
,
41
Range
{0.0, 1000.0});
42
REX_SETTING(i32, resolution_scale_x, 1,
"Draw resolution scale X"
,
Range
{1, 8}, kRestart);
43
REX_SETTING(i32, resolution_scale_y, 1,
"Draw resolution scale Y"
,
Range
{1, 8}, kRestart);
44
REX_SETTING(i32, anisotropic_override, 3,
45
"Anisotropic filtering, -1 for the title's choice, 0 for off, 1 to 5 for 1x to 16x"
,
46
Range
{-1, 5});
47
};
48
54
REX_DECLARE_INTERFACE
(
IGraphicsSystem
, 1)
55
virtual
GraphicsSettings
& GetSettings() = 0;
56
57
virtual
bool
HasDriver() const = 0;
58
60
virtual std::
string
GetDriverName() const = 0;
61
65
virtual
void
ReportFrame() = 0;
66
68
virtual
FrameStats
GetFrameStats() const = 0;
69
};
70
71
}
// namespace rex::gpu
rex::SettingOwner::SettingOwner
SettingOwner(std::string_view scope)
rex::gpu::GraphicsSettings
Definition
graphics_system.h:29
rex::gpu::IGraphicsSystem
Definition
graphics_system.h:54
module.h
Interfaces, factory and module declaration.
REX_DECLARE_INTERFACE
#define REX_DECLARE_INTERFACE(Name, version)
Definition
module.h:114
rex::gpu
Definition
app.h:38
platform.h
Platform flags, packing macros and export markers.
REX_GPU_API
#define REX_GPU_API
Definition
platform.h:245
setting.h
Typed settings and the owners that declare them.
settings_registry.h
The registry of every registered setting.
rex::Range
Definition
setting.h:78
rex::gpu::FrameStats
Definition
graphics_system.h:23
rex::gpu::FrameStats::frame_count
u64 frame_count
Definition
graphics_system.h:26
rex::gpu::FrameStats::frame_time_ms
f64 frame_time_ms
Definition
graphics_system.h:24
types.h
Integer types, byte order wrappers and size literals.
rex
gpu
graphics_system.h
Generated by
1.18.0