Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Renderer.hpp
1#pragma once
2#include "system/Config.hpp"
3#include "input/Camera.hpp"
4#include "resources/Texture.hpp"
5
10class Renderer {
11
12public:
13
17 Renderer(const std::string & name);
18
25 virtual void draw(const Camera & camera, Texture* dstColor, Texture* dstDepth, uint layer = 0);
26
31 virtual void resize(uint width, uint height);
32
36 virtual void interface();
37
39 virtual ~Renderer() = default;
40
42 Renderer(const Renderer &) = delete;
43
47 Renderer & operator=(const Renderer &) = delete;
48
50 Renderer(Renderer &&) = delete;
51
55 Renderer & operator=(Renderer &&) = delete;
56
59
62
63protected:
64
65 std::string _name;
66 Layout _colorFormat = Layout::NONE;
67 Layout _depthFormat = Layout::NONE;
68};
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
Base structure of a renderer.
Definition: Renderer.hpp:10
Layout _colorFormat
The preferred output format for a given renderer.
Definition: Renderer.hpp:66
Layout outputColorFormat() const
Definition: Renderer.hpp:58
Layout outputDepthFormat() const
Definition: Renderer.hpp:61
virtual void interface()
Definition: Renderer.cpp:12
std::string _name
Debug name.
Definition: Renderer.hpp:65
virtual void resize(uint width, uint height)
Definition: Renderer.cpp:17
Renderer & operator=(const Renderer &)=delete
Renderer(const Renderer &)=delete
Renderer(Renderer &&)=delete
virtual void draw(const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0)
Definition: Renderer.cpp:7
virtual ~Renderer()=default
Renderer & operator=(Renderer &&)=delete
Layout _depthFormat
The preferred output format for a given renderer.
Definition: Renderer.hpp:67
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Layout
The layout of a texture: components count and type.
Definition: GPUTypes.hpp:225