diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-27 09:59:06 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-27 13:13:57 +0200 |
commit | 1c5eb68d2d791c87a2030e4b17fb26bdd7931888 (patch) | |
tree | 93086d7eb082f8a7d36840688eca87b42e4ba501 /draw/anim.cpp | |
parent | 2a527f27e22ae35d4d8fccc66451745c7c93d1f9 (diff) |
draw, main, shaders: now use shaders/tuc
Diffstat (limited to 'draw/anim.cpp')
-rw-r--r-- | draw/anim.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/draw/anim.cpp b/draw/anim.cpp index 0270ef6d..02421ddb 100644 --- a/draw/anim.cpp +++ b/draw/anim.cpp @@ -77,10 +77,9 @@ void anim_mesh::draw(tile_shader& shader, const Vector2i& win_size, chunk& c, st { fm_assert(i < size); GL::MeshView mesh{mesh_}; - atlas.texture().bind(0); mesh.setCount((int)(quad_index_count * 1)); mesh.setIndexRange((int)(x.mesh_idx*quad_index_count), 0, max_index); - shader.draw(mesh); + shader.draw(atlas.texture(), mesh); i++; } else @@ -105,8 +104,7 @@ void anim_mesh::draw(tile_shader& shader, anim_atlas& atlas, rotation r, size_t for (auto i = 0uz; i < 4; i++) array[i] = { pos[i], texcoords[i], depth }; _vertex_buffer.setSubData(0, array); - atlas.texture().bind(0); - shader.draw(_mesh); + shader.draw(atlas.texture(), _mesh); } void anim_mesh::draw(tile_shader& shader, anim_atlas& atlas, rotation r, size_t frame, local_coords xy, Vector2b offset, float depth) |