Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
StenciledRenderer.hpp
1#pragma once
2
3#include "scene/Scene.hpp"
4#include "renderers/Renderer.hpp"
5
6#include "resources/Texture.hpp"
7#include "input/ControllableCamera.hpp"
8
9#include "Common.hpp"
10
15class StenciledRenderer final : public Renderer {
16
17public:
21 explicit StenciledRenderer(const glm::vec2 & resolution);
22
26 void setScene(const std::shared_ptr<Scene> & scene);
27
29 void draw(const Camera & camera, Texture* dstColor, Texture* dstDepth, uint layer = 0) override;
30
33 void resize(uint width, uint height) override;
34
35private:
36
39 std::shared_ptr<Scene> _scene;
40
43
44};
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Base structure of a renderer.
Definition: Renderer.hpp:10
Renders a scene with an alternating black and white region style, using the stencil buffer to count p...
Definition: StenciledRenderer.hpp:15
std::shared_ptr< Scene > _scene
The scene to render.
Definition: StenciledRenderer.hpp:39
void draw(const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) override
Definition: StenciledRenderer.cpp:30
void resize(uint width, uint height) override
Definition: StenciledRenderer.cpp:95
Texture _sceneDepth
Scene depth texture.
Definition: StenciledRenderer.hpp:38
Program * _fillProgram
Final screen filling.
Definition: StenciledRenderer.hpp:42
Program * _objectProgram
Basic stencil program.
Definition: StenciledRenderer.hpp:41
Texture _sceneColor
Scene color texture.
Definition: StenciledRenderer.hpp:37
void setScene(const std::shared_ptr< Scene > &scene)
Definition: StenciledRenderer.cpp:21
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12