From c3eea71370eb94cff1fd96185458643fab6eb2c5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 3 Nov 2022 19:47:46 +0000 Subject: Restructure how shaders are worked with Needs a tidy-up --- ui/sceneRenderer.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ui/sceneRenderer.h') 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 +#include class SceneRenderer { public: - SceneRenderer(glm::ivec2 size); + explicit SceneRenderer(glm::ivec2 size); void render(std::function 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; }; -- cgit v1.2.3