summaryrefslogtreecommitdiffhomepage
path: root/draw/anim.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-07 15:27:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-07 15:27:08 +0100
commit151e1f9a56bce31c2703610980c00fc8f527aa6a (patch)
treec4663ffca0ff35dc2dda04f3cd8e54966683faa2 /draw/anim.hpp
parent9e390f58ea6e4c50d7ba104c5fe3ad97f74fe6f0 (diff)
wip
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