From 07064efcfecb0f1140f829ee2481079fa02cc587 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jul 2024 23:21:25 +0100 Subject: Simplify setup of uniform locations and containing programs --- gfx/gl/sceneRenderer.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gfx/gl/sceneRenderer.h') diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h index 021936f..4195bcf 100644 --- a/gfx/gl/sceneRenderer.h +++ b/gfx/gl/sceneRenderer.h @@ -42,8 +42,11 @@ protected: const RGB &, const Direction3D &, const GlobalPosition3D &, const std::span) const; private: - RequiredUniformLocation directionLoc, colourLoc, lightPointLoc, lightViewProjectionLoc, - lightViewProjectionCountLoc; + RequiredUniformLocation directionLoc {*this, "lightDirection"}; + RequiredUniformLocation colourLoc {*this, "lightColour"}; + RequiredUniformLocation lightPointLoc {*this, "lightPoint"}; + RequiredUniformLocation lightViewProjectionLoc {*this, "lightViewProjection"}; + RequiredUniformLocation lightViewProjectionCountLoc {*this, "lightViewProjectionCount"}; }; DeferredLightProgram lighting; -- cgit v1.2.3