summaryrefslogtreecommitdiffhomepage
path: root/draw/anim.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'draw/anim.hpp')
-rw-r--r--draw/anim.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/draw/anim.hpp b/draw/anim.hpp
index 60a4e839..85c73bcb 100644
--- a/draw/anim.hpp
+++ b/draw/anim.hpp
@@ -9,17 +9,18 @@
#include <Magnum/GL/Mesh.h>
#include <Magnum/GL/Buffer.h>
-namespace floormat::Serialize { struct anim_atlas; struct anim_frame; }
+namespace floormat::Serialize { struct anim_frame; }
namespace floormat {
+struct tile_shader;
struct anim_atlas;
using anim_frame = Serialize::anim_frame;
struct anim_mesh final
{
anim_mesh();
- void draw(local_coords pos, const anim_atlas& atlas, const anim_frame& frame);
+ void draw(tile_shader& shader, const anim_atlas& atlas, const anim_frame& frame, local_coords pos);
private:
struct vertex_data final { Vector2 texcoords; };
@@ -27,10 +28,9 @@ private:
static std::array<UnsignedShort, 6> make_index_array();
-
GL::Mesh _mesh;
GL::Buffer _vertex_buffer{quad_data{}, Magnum::GL::BufferUsage::DynamicDraw},
- _index_buffer{make_index_array()}, _positions_buffer{quad_data{}};
+ _index_buffer{make_index_array()}, _positions_buffer{std::array<Vector3, 4>{}};
};
} // namespace floormat