diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 19:47:46 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 19:48:31 +0000 |
commit | c3eea71370eb94cff1fd96185458643fab6eb2c5 (patch) | |
tree | cb331dd81d9cb36d69e1b659353796ec170a78e4 /ui/sceneRenderer.h | |
parent | Rename Shader to SceneShader (diff) | |
download | ilt-c3eea71370eb94cff1fd96185458643fab6eb2c5.tar.bz2 ilt-c3eea71370eb94cff1fd96185458643fab6eb2c5.tar.xz ilt-c3eea71370eb94cff1fd96185458643fab6eb2c5.zip |
Restructure how shaders are worked with
Needs a tidy-up
Diffstat (limited to 'ui/sceneRenderer.h')
-rw-r--r-- | ui/sceneRenderer.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/sceneRenderer.h b/ui/sceneRenderer.h index 6176f1b..6c96418 100644 --- a/ui/sceneRenderer.h +++ b/ui/sceneRenderer.h @@ -1,12 +1,13 @@ #pragma once -#include "gfx/gl/sceneShader.h" +#include "gfx/gl/program.h" #include "lib/glArrays.h" #include <functional> +#include <glm/fwd.hpp> class SceneRenderer { public: - SceneRenderer(glm::ivec2 size); + explicit SceneRenderer(glm::ivec2 size); void render(std::function<void()> content) const; @@ -14,7 +15,12 @@ private: glFrameBuffer gBuffer; glTexture gPosition, gNormal, gAlbedoSpec; glRenderBuffer depth; - ProgramHandleBase lighting; + class DeferredLightProgram : public Program { + public: + using Program::Program; + using Program::use; + }; + DeferredLightProgram lighting; glVertexArray displayVAO; glBuffer displayVBO; }; |