summaryrefslogtreecommitdiff
path: root/ui/sceneRenderer.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-11-01 19:12:04 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-11-01 19:12:04 +0000
commit3b791f79bf53e481d053ea4516eedce8be3423bf (patch)
tree39817b0996eaa867c7f7abbc5dbd5cb706ecbaa5 /ui/sceneRenderer.h
parentSomewhat dirty but functional helper to save a texture (diff)
downloadilt-3b791f79bf53e481d053ea4516eedce8be3423bf.tar.bz2
ilt-3b791f79bf53e481d053ea4516eedce8be3423bf.tar.xz
ilt-3b791f79bf53e481d053ea4516eedce8be3423bf.zip
Switch to a deferred lighting based render pipeline
Tidy-up required.
Diffstat (limited to 'ui/sceneRenderer.h')
-rw-r--r--ui/sceneRenderer.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/sceneRenderer.h b/ui/sceneRenderer.h
new file mode 100644
index 0000000..2e1c372
--- /dev/null
+++ b/ui/sceneRenderer.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "gfx/gl/shader.h"
+#include "lib/glArrays.h"
+#include <functional>
+
+class SceneRenderer {
+public:
+ SceneRenderer(glm::ivec2 size);
+
+ void render(std::function<void()> content) const;
+
+private:
+ glFrameBuffer gBuffer;
+ glTexture gPosition, gNormal, gAlbedoSpec;
+ glRenderBuffer depth;
+ ProgramHandleBase lighting;
+};