diff options
Diffstat (limited to 'shaders/tile-shader.hpp')
-rw-r--r-- | shaders/tile-shader.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shaders/tile-shader.hpp b/shaders/tile-shader.hpp index fd865208..2dd7e607 100644 --- a/shaders/tile-shader.hpp +++ b/shaders/tile-shader.hpp @@ -2,6 +2,7 @@ #include <Magnum/GL/AbstractShaderProgram.h> #include <Magnum/Math/Vector2.h> #include <Magnum/Math/Vector3.h> +#include <Magnum/Math/Color.h> namespace Magnum::Examples { @@ -16,13 +17,16 @@ struct tile_shader : GL::AbstractShaderProgram tile_shader& set_scale(const Vector2& scale); Vector2 camera_offset() const { return camera_offset_; } tile_shader& set_camera_offset(Vector2 camera_offset); + Color4 tint () const { return tint_; } + tile_shader& set_tint(const Color4& tint); static constexpr Vector2 project(Vector3 pt); private: Vector2 scale_, camera_offset_; + Color4 tint_; - enum { ScaleUniform = 0, OffsetUniform = 1, }; + enum { ScaleUniform = 0, OffsetUniform = 1, TintUniform = 2, }; }; constexpr Vector2 tile_shader::project(const Vector3 pt) |