Euphoria
renderer.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "eu/render/debug.h"
9#include "eu/render/world.h"
10
11namespace eu::render
12{
13
18struct RendererPimpl;
19
20
21// todo(Gustav): move to a different file?
27
28
31{
35
36 std::unique_ptr<RendererPimpl> pimpl;
37
40
41 Renderer(const Renderer&) = delete;
42 Renderer(Renderer&&) = delete;
43 void operator=(const Renderer&) = delete;
44 void operator=(Renderer&&) = delete;
45
46 std::shared_ptr<UnlitMaterial> make_unlit_material() const;
47 std::shared_ptr<DefaultMaterial> make_default_material() const;
48
51
52 std::shared_ptr<FactorEffect> make_invert_effect() const;
53 std::shared_ptr<FactorEffect> make_grayscale_effect() const;
54 std::shared_ptr<FactorEffect> make_damage_effect() const;
55 std::shared_ptr<FactorEffect> make_blur_effect() const;
56
57 [[nodiscard]] Skybox make_skybox(std::shared_ptr<TextureCubemap> texture) const;
58
60 [[nodiscard]] bool is_loaded() const;
61
63 void render_world(const Size& window_size, const World&, const CompiledCamera&, const ShadowContext& shadow_context);
64
65 void render_shadows(const Size& window_size, const World&, const CompiledCamera&) const;
66};
67
72} // namespace eu::render
Definition ui.h:4
A (inclusive) range between two values.
Definition range.h:19
a size
Definition size.h:11
A list of CompiledVertexLayoutNoNameList (for geom)
4x4 matrix
Definition mat4.h:19
A "compiled" camera for use in rendering.
Definition camera.h:41
Just stores debug render requests and doesn't actually render anything.
Definition debug.h:24
"render to texture" feature
Definition texture.h:101
Startup settings for the renderer.
The rendering engine.
Definition renderer.h:31
void render_world(const Size &window_size, const World &, const CompiledCamera &, const ShadowContext &shadow_context)
doesn't set the size, prefer EffectStack::render
std::shared_ptr< FactorEffect > make_invert_effect() const
DebugRender debug
Definition renderer.h:34
std::shared_ptr< FactorEffect > make_grayscale_effect() const
std::shared_ptr< FactorEffect > make_blur_effect() const
std::shared_ptr< UnlitMaterial > make_unlit_material() const
core::CompiledGeomVertexAttributes default_geom_layout() const
bool is_loaded() const
verify that the renderer was fully loaded
std::shared_ptr< DefaultMaterial > make_default_material() const
std::unique_ptr< RendererPimpl > pimpl
Definition renderer.h:36
Skybox make_skybox(std::shared_ptr< TextureCubemap > texture) const
core::CompiledGeomVertexAttributes unlit_geom_layout() const
RenderSettings settings
Definition renderer.h:33
std::shared_ptr< FactorEffect > make_damage_effect() const
Renderer(Renderer &&)=delete
Renderer(State *states, Assets *default_assets, const RenderSettings &settings)
void operator=(const Renderer &)=delete
Renderer(const Renderer &)=delete
void render_shadows(const Size &window_size, const World &, const CompiledCamera &) const
void operator=(Renderer &&)=delete
FrameBuffer * directional_shadow_map
Definition renderer.h:24
A skybox model with a cubemap texture.
Definition world.h:186
A "cache" for the current open gl state.
Definition state.h:119
A list of objects to render.
Definition world.h:194