Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
EditorRenderer.hpp
1#pragma once
2#include "renderers/DebugLightRenderer.hpp"
3
4#include "scene/Scene.hpp"
5#include "renderers/Renderer.hpp"
6#include "resources/Texture.hpp"
7#include "input/ControllableCamera.hpp"
8
9#include "Common.hpp"
10
15class EditorRenderer final : public Renderer {
16
17public:
20 explicit EditorRenderer();
21
25 void setScene(const std::shared_ptr<Scene> & scene);
26
28 void draw(const Camera & camera, Texture* dstColor, Texture* dstDepth, uint layer = 0) override;
29
30private:
31
37 void renderBackground(const glm::mat4 & view, const glm::mat4 & proj, const glm::vec3 & pos);
38
40
45 std::shared_ptr<Scene> _scene;
46
47};
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
Visualize lights as colored wireframe objects.
Definition: DebugLightRenderer.hpp:17
Render the scene in the editor.
Definition: EditorRenderer.hpp:15
EditorRenderer()
Definition: EditorRenderer.cpp:8
void setScene(const std::shared_ptr< Scene > &scene)
Definition: EditorRenderer.cpp:23
void draw(const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) override
Definition: EditorRenderer.cpp:27
Program * _atmoProgram
Atmosphere shader.
Definition: EditorRenderer.hpp:44
DebugLightRenderer _lightsDebug
Lights wireframe renderer.
Definition: EditorRenderer.hpp:39
void renderBackground(const glm::mat4 &view, const glm::mat4 &proj, const glm::vec3 &pos)
Definition: EditorRenderer.cpp:76
Program * _skyboxProgram
Skybox program.
Definition: EditorRenderer.hpp:42
Program * _objectProgram
Basic object program.
Definition: EditorRenderer.hpp:41
Program * _bgProgram
2D background program.
Definition: EditorRenderer.hpp:43
std::shared_ptr< Scene > _scene
The scene to render.
Definition: EditorRenderer.hpp:45
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Base structure of a renderer.
Definition: Renderer.hpp:10
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12