summaryrefslogtreecommitdiffhomepage
path: root/tile-shader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tile-shader.hpp')
-rw-r--r--tile-shader.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tile-shader.hpp b/tile-shader.hpp
index f412c49d..f2aa169f 100644
--- a/tile-shader.hpp
+++ b/tile-shader.hpp
@@ -13,12 +13,16 @@ struct tile_shader : GL::AbstractShaderProgram
typedef GL::Attribute<1, Vector2> TextureCoordinates;
explicit tile_shader();
+ Vector2 scale() const { return scale_; }
+ Vector2 project(Vector3 pt) const;
tile_shader& set_scale(const Vector2& scale);
+ tile_shader& set_camera_offset(Vector2 camera_offset);
tile_shader& bindTexture(GL::Texture2D& texture);
private:
+ Vector2 scale_, camera_offset_;
enum { TextureUnit = 0 };
- enum { ProjectionUniform = 0, };
+ enum { ScaleUniform = 0, OffsetUniform = 3, };
};
} // namespace Magnum::Examples