blob: 50feaa28ca6273d5661f448d59afb7f8ace0603e (
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
27
28
29
30
31
32
|
#pragma once
#include "gfx/gl/camera.h"
#include "gfx/gl/program.h"
#include "gfx/gl/sceneShader.h"
#include "lib/glArrays.h"
#include <functional>
#include <glm/fwd.hpp>
class SceneRenderer {
public:
explicit SceneRenderer(glm::ivec2 size, GLuint output);
void render(std::function<void(const SceneShader &)> content) const;
Camera camera;
private:
GLuint output;
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;
SceneShader shader;
};
|