Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
StenciledApp.hpp
1#pragma once
2
3#include "StenciledRenderer.hpp"
4
5#include "Application.hpp"
6#include "scene/Scene.hpp"
7#include "renderers/Renderer.hpp"
8#include "input/ControllableCamera.hpp"
9
10#include "Common.hpp"
11
16class StenciledApp final : public CameraApp {
17
18public:
23 explicit StenciledApp(RenderingConfig & config, Window & window);
24
26 void draw() override;
27
29 void update() override;
30
32 void physics(double fullTime, double frameTime) override;
33
35 void resize() override;
36
37private:
38
42 void setScene(const std::shared_ptr<Scene> & scene);
43
44 std::unique_ptr<StenciledRenderer> _renderer;
46
47 std::vector<std::shared_ptr<Scene>> _scenes;
48 std::vector<std::string> _sceneNames;
49 size_t _currentScene = 0;
50};
double frameTime()
Definition: Application.cpp:87
Window & window()
Definition: Application.cpp:95
Application with an interactive camera.
Definition: Application.hpp:89
Configuration containing parameters for windows and renderers.
Definition: Config.hpp:113
Application for the stencil demo.
Definition: StenciledApp.hpp:16
void update() override
Definition: StenciledApp.cpp:66
std::unique_ptr< StenciledRenderer > _renderer
Stenciled renderer.
Definition: StenciledApp.hpp:44
void draw() override
Definition: StenciledApp.cpp:54
void physics(double fullTime, double frameTime) override
Definition: StenciledApp.cpp:97
size_t _currentScene
Currently selected scene.
Definition: StenciledApp.hpp:49
void setScene(const std::shared_ptr< Scene > &scene)
Definition: StenciledApp.cpp:29
std::vector< std::string > _sceneNames
The associated scene names.
Definition: StenciledApp.hpp:48
Texture _finalRender
The final render.
Definition: StenciledApp.hpp:45
std::vector< std::shared_ptr< Scene > > _scenes
The existing scenes.
Definition: StenciledApp.hpp:47
void resize() override
Definition: StenciledApp.cpp:103
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Represent an OS window and its associated rendering context.
Definition: Window.hpp:14