blob: 6c964182e6adac8e5a839ae5843b023da5b83b93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include "gfx/gl/program.h"
#include "lib/glArrays.h"
#include <functional>
#include <glm/fwd.hpp>
class SceneRenderer {
public:
explicit SceneRenderer(glm::ivec2 size);
void render(std::function<void()> content) const;
private:
glFrameBuffer gBuffer;
glTexture gPosition, gNormal, gAlbedoSpec;
glRenderBuffer depth;
class DeferredLightProgram : public Program {
public:
using Program::Program;
using Program::use;
};
DeferredLightProgram lighting;
glVertexArray displayVAO;
glBuffer displayVBO;
};
|