summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-29 01:02:51 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-29 01:02:51 +0000
commit83c43ea9e39f4e6ed5e50ccced66700af39987be (patch)
tree0386b305693c930ef6b9a4d34dece4e53ad988c6 /gfx/gl/shadowMapper.h
parentMerge common parts of shadow programs into a base class (diff)
downloadilt-83c43ea9e39f4e6ed5e50ccced66700af39987be.tar.bz2
ilt-83c43ea9e39f4e6ed5e50ccced66700af39987be.tar.xz
ilt-83c43ea9e39f4e6ed5e50ccced66700af39987be.zip
Set shadow program uniforms all in one function, merge setting of view projections
Diffstat (limited to 'gfx/gl/shadowMapper.h')
-rw-r--r--gfx/gl/shadowMapper.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/gl/shadowMapper.h b/gfx/gl/shadowMapper.h
index 4f81e58..b948f50 100644
--- a/gfx/gl/shadowMapper.h
+++ b/gfx/gl/shadowMapper.h
@@ -5,6 +5,7 @@
#include "program.h"
#include <gfx/models/texture.h>
#include <glm/vec2.hpp>
+#include <span>
#include <vector>
class SceneProvider;
@@ -28,12 +29,11 @@ public:
public:
explicit ShadowProgram(const Shader & vs);
- void setViewPoint(const GlobalPosition3D, size_t n) const;
- void setViewProjection(const glm::mat4 &, size_t n) const;
+ void setView(const std::span<const glm::mat4>, const GlobalPosition3D) const;
void use() const;
private:
- std::array<RequiredUniformLocation, 4> viewProjectionLoc;
+ RequiredUniformLocation viewProjectionLoc;
RequiredUniformLocation viewProjectionsLoc;
RequiredUniformLocation viewPointLoc;
};