diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-01 19:12:04 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-01 19:12:04 +0000 |
commit | 3b791f79bf53e481d053ea4516eedce8be3423bf (patch) | |
tree | 39817b0996eaa867c7f7abbc5dbd5cb706ecbaa5 /ui/sceneRenderer.h | |
parent | Somewhat dirty but functional helper to save a texture (diff) | |
download | ilt-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.h | 18 |
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; +}; |