summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneRenderer.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-01 17:56:26 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-01 17:56:26 +0000
commitd5cdbbf38380239524e351cb69aec94090884ca5 (patch)
tree5d7dff2f2775701069806eceb4eaef23b22eba3f /gfx/gl/sceneRenderer.h
parentReformat with new clang-format (diff)
parentRemove more use of legacy types (diff)
downloadilt-d5cdbbf38380239524e351cb69aec94090884ca5.tar.bz2
ilt-d5cdbbf38380239524e351cb69aec94090884ca5.tar.xz
ilt-d5cdbbf38380239524e351cb69aec94090884ca5.zip
Merge remote-tracking branch 'origin/terrain'
Diffstat (limited to 'gfx/gl/sceneRenderer.h')
-rw-r--r--gfx/gl/sceneRenderer.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h
index 55df84d..797ecf1 100644
--- a/gfx/gl/sceneRenderer.h
+++ b/gfx/gl/sceneRenderer.h
@@ -11,20 +11,20 @@
class SceneRenderer {
public:
- explicit SceneRenderer(glm::ivec2 size, GLuint output);
+ explicit SceneRenderer(ScreenAbsCoord size, GLuint output);
void render(const SceneProvider &) const;
- void setAmbientLight(const glm::vec3 & colour) const;
- void setDirectionalLight(const glm::vec3 & colour, const glm::vec3 & direction, const SceneProvider &) const;
+ void setAmbientLight(const RGB & colour) const;
+ void setDirectionalLight(const RGB & colour, const Direction3D & direction, const SceneProvider &) const;
Camera camera;
-private:
+protected:
void renderQuad() const;
- glm::ivec2 size;
+ ScreenAbsCoord size;
GLuint output;
- glFrameBuffer gBuffer;
+ glFrameBuffer gBuffer, gBufferIll;
glTexture gPosition, gNormal, gAlbedoSpec, gIllumination;
glRenderBuffer depth;
@@ -39,12 +39,12 @@ private:
DirectionalLightProgram();
using Program::use;
- void setDirectionalLight(const glm::vec3 &, const glm::vec3 &, const std::span<const glm::mat4x4>,
- const std::span<const glm::vec4>, std::size_t maps) const;
+ void setDirectionalLight(const RGB &, const Direction3D &, const GlobalPosition3D &,
+ const std::span<const glm::mat4x4>, const std::span<const TextureRelRegion>, std::size_t maps) const;
private:
- RequiredUniformLocation directionLoc, colourLoc, lightViewProjectionLoc, lightViewProjectionCountLoc,
- lightViewShadowMapRegionLoc;
+ RequiredUniformLocation directionLoc, colourLoc, lightPointLoc, lightViewProjectionLoc,
+ lightViewProjectionCountLoc, lightViewShadowMapRegionLoc;
};
DeferredLightProgram lighting;