ReXGlue SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics_driver.h
Go to the documentation of this file.
1
10
11
#pragma once
12
13
#include <
rex/driver.h
>
14
#include <
rex/platform/native_window.h
>
15
#include <
rex/overlay_renderer.h
>
16
#include <
rex/guest.h
>
17
#include <
rex/memory/host.h
>
18
#include <
rex/result.h
>
19
#include <
rex/title.h
>
20
#include <
rex/types.h
>
21
22
namespace
rex::gpu
{
23
25
inline
constexpr
memory::Tag
kGPU
{3};
26
27
struct
FrameStatus
{
28
bool
new_frame
=
false
;
29
};
30
31
class
IXenosGraphicsDriver
;
32
37
class
IGraphicsDriver
:
public
IDriver
,
public
IOverlayRenderer
{
38
public
:
44
virtual
IXenosGraphicsDriver
*
AsXenos
() {
return
nullptr
; }
45
52
[[nodiscard]]
virtual
Result<void>
SetSurface
(
const
NativeWindow
& window) {
53
(void)window;
54
return
{};
55
}
56
62
[[nodiscard]]
virtual
Result<void>
AttachTitle
(
const
TitleInfo
& info,
IPhysicalMemory
&
memory
,
63
IPhysicalWriteWatch
& watch,
64
IGuestInterrupts
& interrupts) {
65
(void)info;
66
(void)
memory
;
67
(void)watch;
68
(void)interrupts;
69
return
{};
70
}
71
75
virtual
void
DetachTitle
() {}
76
78
virtual
FrameStatus
WaitForFrame
(u32 timeout_ms) = 0;
79
81
virtual
void
ResizeSurface
(u32 width, u32 height) = 0;
82
90
[[nodiscard]]
virtual
bool
BeginPresent
() = 0;
91
93
virtual
void
EndPresent
() = 0;
94
};
95
96
}
// namespace rex::gpu
rex::IDriver
Definition
driver.h:41
rex::IGuestInterrupts
Definition
guest.h:127
rex::IOverlayRenderer
Definition
overlay_renderer.h:18
rex::IPhysicalMemory
Definition
guest.h:50
rex::IPhysicalWriteWatch
Definition
guest.h:101
rex::gpu::IGraphicsDriver
Definition
graphics_driver.h:37
rex::gpu::IGraphicsDriver::ResizeSurface
virtual void ResizeSurface(u32 width, u32 height)=0
rex::gpu::IGraphicsDriver::WaitForFrame
virtual FrameStatus WaitForFrame(u32 timeout_ms)=0
rex::gpu::IGraphicsDriver::SetSurface
virtual Result< void > SetSurface(const NativeWindow &window)
Definition
graphics_driver.h:52
rex::gpu::IGraphicsDriver::AsXenos
virtual IXenosGraphicsDriver * AsXenos()
Definition
graphics_driver.h:44
rex::gpu::IGraphicsDriver::DetachTitle
virtual void DetachTitle()
Definition
graphics_driver.h:75
rex::gpu::IGraphicsDriver::BeginPresent
virtual bool BeginPresent()=0
rex::gpu::IGraphicsDriver::EndPresent
virtual void EndPresent()=0
rex::gpu::IGraphicsDriver::AttachTitle
virtual Result< void > AttachTitle(const TitleInfo &info, IPhysicalMemory &memory, IPhysicalWriteWatch &watch, IGuestInterrupts &interrupts)
Definition
graphics_driver.h:62
rex::gpu::IXenosGraphicsDriver
Definition
xenos_graphics_driver.h:22
driver.h
guest.h
Guest memory, write watch and interrupt interfaces.
host.h
rex::gpu
Definition
app.h:38
rex::gpu::kGPU
constexpr memory::Tag kGPU
Definition
graphics_driver.h:25
rex::memory
Definition
endian.h:27
rex::memory::Tag
Tag
Definition
host.h:22
rex::Result
std::expected< T, Error > Result
Definition
result.h:98
native_window.h
overlay_renderer.h
result.h
rex::NativeWindow
Definition
native_window.h:17
rex::TitleInfo
Definition
title.h:33
rex::gpu::FrameStatus
Definition
graphics_driver.h:27
rex::gpu::FrameStatus::new_frame
bool new_frame
Definition
graphics_driver.h:28
title.h
types.h
Integer types, byte order wrappers and size literals.
rex
gpu
graphics_driver.h
Generated by
1.18.0