Lugdunum
0.1.0
include
lug
Graphics
Renderer.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <set>
5
#include <string>
6
7
#include <
lug/Core/Version.hpp
>
8
#include <
lug/Graphics/Module.hpp
>
9
#include <
lug/Graphics/Render/Window.hpp
>
10
#include <
lug/Graphics/Render/Technique/Type.hpp
>
11
#include <
lug/Graphics/ResourceManager.hpp
>
12
13
namespace
lug
{
14
namespace
Graphics {
15
16
class
Graphics;
17
18
class
LUG_GRAPHICS_API
Renderer
{
19
public
:
20
enum class
Type
: uint8_t {
21
Vulkan
22
};
23
24
enum class
DisplayMode
: uint8_t {
25
Full,
26
Albedo,
27
Normal,
28
Metallic,
29
Roughness,
30
AmbientOcclusion,
31
AmbientOcclusionRoughnessMetallic,
32
Emissive
33
};
34
35
struct
InitInfo
{
36
std::string
shadersRoot
;
37
Render::Technique::Type
renderTechnique
;
38
DisplayMode
displayMode{DisplayMode::Full};
39
};
40
41
public
:
42
Renderer
(
Graphics
& graphics,
Type
type);
43
44
Renderer
(
const
Renderer
&) =
delete
;
45
Renderer
(
Renderer
&&) =
delete
;
46
47
Renderer
& operator=(
const
Renderer
&) =
delete
;
48
Renderer
& operator=(
Renderer
&&) =
delete
;
49
50
virtual
~
Renderer
() =
default
;
51
52
virtual
bool
beginInit(
const
std::string& appName,
const
Core::Version
& appVersion,
const
InitInfo
& initInfo) = 0;
53
virtual
bool
finishInit() = 0;
54
55
virtual
bool
beginFrame(
const
lug::System::Time
& elapsedTime) = 0;
56
virtual
bool
endFrame() = 0;
57
58
virtual
Render::Window
* createWindow(
Render::Window::InitInfo
& initInfo) = 0;
59
virtual
Render::Window
* getWindow() = 0;
60
61
const
InitInfo
& getInfo()
const
;
62
Type
getType()
const
;
63
64
const
DisplayMode
& getDisplayMode()
const
;
65
void
setDisplayMode(
DisplayMode
displayMode);
66
67
ResourceManager
* getResourceManager()
const
;
68
69
protected
:
70
Graphics
&
_graphics
;
71
Type
_type
;
72
DisplayMode
_displayMode
;
73
InitInfo
_initInfo
;
74
std::unique_ptr<ResourceManager> _resourceManager{
nullptr
};
75
};
76
77
#include <
lug/Graphics/Renderer.inl
>
78
79
}
// Graphics
80
}
// lug
Module.hpp
lug::Graphics::Renderer::InitInfo::shadersRoot
std::string shadersRoot
Definition:
Renderer.hpp:36
lug::Core::Version
Stores the version of the Application.
Definition:
Version.hpp:9
Type.hpp
lug::Graphics::Render::Window::InitInfo
Definition:
Window.hpp:16
Renderer.inl
LUG_GRAPHICS_API
#define LUG_GRAPHICS_API
Definition:
Export.hpp:11
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Renderer::_displayMode
DisplayMode _displayMode
Definition:
Renderer.hpp:72
lug::Graphics::Renderer::InitInfo
Definition:
Renderer.hpp:35
lug::Graphics::Renderer::InitInfo::renderTechnique
Render::Technique::Type renderTechnique
Definition:
Renderer.hpp:37
ResourceManager.hpp
lug::Graphics::Render::Technique::Type
Type
Definition:
Type.hpp:10
lug::Graphics::Render::Window
Definition:
Window.hpp:14
lug::Graphics::Renderer::DisplayMode
DisplayMode
Definition:
Renderer.hpp:24
lug::Graphics::Renderer::_initInfo
InitInfo _initInfo
Definition:
Renderer.hpp:73
lug::Graphics::Renderer::_graphics
Graphics & _graphics
Definition:
Renderer.hpp:70
lug::System::Time
Definition:
Time.hpp:9
Version.hpp
lug::Graphics::Renderer::Type
Type
Definition:
Renderer.hpp:20
lug::Graphics::Renderer
Definition:
Renderer.hpp:18
lug::Graphics::Renderer::_type
Type _type
Definition:
Renderer.hpp:71
lug
Definition:
Application.hpp:11
lug::Graphics::ResourceManager
Class for resource manager. The ResourceManager allows the user to load resources and store them...
Definition:
ResourceManager.hpp:23
lug::Graphics::Graphics
Class for graphics.
Definition:
Graphics.hpp:25
Window.hpp
Generated by
1.8.13