summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shadowMapper.h')
-rw-r--r--gfx/gl/shadowMapper.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/gfx/gl/shadowMapper.h b/gfx/gl/shadowMapper.h
index 065db4f..421e6a5 100644
--- a/gfx/gl/shadowMapper.h
+++ b/gfx/gl/shadowMapper.h
@@ -26,25 +26,29 @@ public:
class FixedPoint : public Program {
public:
- FixedPoint(const Shader & vs);
- void setViewPoint(const GlobalPosition3D) const;
- void setViewProjection(const glm::mat4 &) const;
+ FixedPoint(const Shader & vs, const Shader & gs);
+ void setViewPoint(const GlobalPosition3D, size_t n) const;
+ void setViewProjection(const glm::mat4 &, size_t n) const;
void use() const;
private:
- RequiredUniformLocation viewProjectionLoc, viewPointLoc;
+ std::array<RequiredUniformLocation, 4> viewProjectionLoc;
+ RequiredUniformLocation viewProjectionsLoc;
+ RequiredUniformLocation viewPointLoc;
};
class DynamicPoint : public Program {
public:
DynamicPoint();
- void setViewPoint(const GlobalPosition3D) const;
- void setViewProjection(const glm::mat4 &) const;
+ void setViewPoint(const GlobalPosition3D, size_t n) const;
+ void setViewProjection(const glm::mat4 &, size_t n) const;
void use(const Location &) const;
void setModel(const Location &) const;
private:
- RequiredUniformLocation viewProjectionLoc, viewPointLoc;
+ std::array<RequiredUniformLocation, 4> viewProjectionLoc;
+ RequiredUniformLocation viewProjectionsLoc;
+ RequiredUniformLocation viewPointLoc;
RequiredUniformLocation modelLoc;
RequiredUniformLocation modelPosLoc;
};