Raito 0.1
Loading...
Searching...
No Matches
RHI.h
Go to the documentation of this file.
1/*
2MIT License
3
4Copyright (c) 2023 Víctor Falcón Zaro
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in all
14copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22SOFTWARE.
23*/
24
25#pragma once
26
27#include "Renderer.h"
28#include "Shader.h"
29
30namespace Raito::Assets
31{
32 struct Mesh;
33 struct Texture;
34}
35
36namespace Raito::Renderer
37{
40
41 struct RHI
42 {
43 bool(*Initialize)();
44 void(*Shutdown)();
45
46 struct
47 {
49 void(*Remove)(u32);
50 void(*Resize)(u32, u32, u32);
53 void(*Render)(u32);
61
62 struct
63 {
64 Shader* (*GetShader)(u32);
65 Shader* (*GetShaderId)(EngineShader);
66 const std::vector<Shader*>& (*GetAllShaders)();
70
71 struct
72 {
74 void(*RemoveMesh)(u32);
75
77
78 struct
79 {
83
84 struct
85 {
90
91 struct
92 {
93 void(*SetSSAO)(bool);
94 void(*SetParallaxMapping)(bool);
95 void(*SetBloom)(bool);
96 void(*SetShadows)(bool);
97 void(*SetDebugAABB)(bool);
98 void(*SetFrustumCulling)(bool);
102 };
103}
unsigned char ubyte
Unsigned byte type.
Definition BasicTypes.h:31
unsigned __int32 u32
Unsigned integer 32 bit type.
Definition BasicTypes.h:55
GLuint Texture
Definition OpenGLPostProcessPass.cpp:29
Definition Shader.h:68
Definition AssetImport.cpp:47
Definition Camera.cpp:33
EngineShader
Definition Shader.h:32
LightTechnique
Definition Renderer.h:119
Definition Mesh.h:48
Definition PbrMaterial.h:8
Definition Texture.h:45
Definition RHI.h:42
void(* SetDebugAABB)(bool)
Definition RHI.h:97
u32(* CompileShader)(const ShaderFileData &)
Definition RHI.h:68
void(* SetSSAO)(bool)
Definition RHI.h:93
u32(* GetDepthAttachment)(u32)
Definition RHI.h:55
void(* SetBloom)(bool)
Definition RHI.h:95
u32(* Width)(u32)
Definition RHI.h:51
struct Raito::Renderer::RHI::@4 Textures
struct Raito::Renderer::RHI::@1 Surface
void(* SetParallaxMapping)(bool)
Definition RHI.h:94
void(* Shutdown)()
Definition RHI.h:44
void(* SetTechnique)(LightTechnique)
Definition RHI.h:100
void(* SetMaterialValue)(u32, const Assets::PbrMaterial material)
Definition RHI.h:87
u32(* GetLightDeferredAttachment)(u32)
Definition RHI.h:58
u32(* AddMaterial)(const Assets::PbrMaterial &material)
Definition RHI.h:86
u32(* GetSSAOAttachment)()
Definition RHI.h:59
void(* RemoveTexture)(u32)
Definition RHI.h:81
void(* RemoveMesh)(u32)
Definition RHI.h:74
u32(* GetDeferredAttachment)(u32)
Definition RHI.h:56
Surface(* Create)(SysWindow *)
Definition RHI.h:48
void(* SetShadows)(bool)
Definition RHI.h:96
u32(* GetColorAttachment)(u32, u32)
Definition RHI.h:54
u32(* Height)(u32)
Definition RHI.h:52
struct Raito::Renderer::RHI::@3 Meshes
u32(* GetDeferredDepth)()
Definition RHI.h:57
bool(* Initialize)()
Definition RHI.h:43
struct Raito::Renderer::RHI::@2 Shader
void(* Resize)(u32, u32, u32)
Definition RHI.h:50
u32(* AddMesh)(Assets::Mesh *)
Definition RHI.h:73
void(* SetFrustumCulling)(bool)
Definition RHI.h:98
u32(* AddTexture)(Assets::Texture *, ubyte *data)
Definition RHI.h:80
LightTechnique(* GetTechnique)(void)
Definition RHI.h:99
void(* Remove)(u32)
Definition RHI.h:49
struct Raito::Renderer::RHI::@6 Settings
void(* Render)(u32)
Definition RHI.h:53
void(* RemoveMaterial)(u32)
Definition RHI.h:88
struct Raito::Renderer::RHI::@5 Materials
ShaderFileData(* GetFileData)(EngineShader)
Definition RHI.h:67
Definition Shader.h:60
System window structure.
Definition Window.h:50