diff --git a/libs/gfx/include/psemek/gfx/mesh.hpp b/libs/gfx/include/psemek/gfx/mesh.hpp index 1de5052d..a539090c 100644 --- a/libs/gfx/include/psemek/gfx/mesh.hpp +++ b/libs/gfx/include/psemek/gfx/mesh.hpp @@ -563,10 +563,10 @@ namespace psemek::gfx load(vertices.data(), vertices.size(), indices.data(), indices.size(), primitive_type, usage); } - template - void load(geom::simplex const * simplices, std::size_t simplex_count, Index const * indices, std::size_t index_count, GLenum usage = gl::STREAM_DRAW) + template + void load(Vertex const * vertices, std::size_t vertex_count, geom::simplex const * simplices, std::size_t simplex_count, GLenum usage = gl::STREAM_DRAW) { - static_assert(sizeof(geom::simplex) == (N + 1) * sizeof(Vertex)); + static_assert(sizeof(geom::simplex) == (N + 1) * sizeof(Index)); GLenum primitive_type; @@ -587,13 +587,13 @@ namespace psemek::gfx static_assert("unknown primitive type"); } - load(reinterpret_cast(simplices), simplex_count * (N + 1), indices, index_count, primitive_type, usage); + load(vertices, vertex_count, reinterpret_cast(simplices), simplex_count * (N + 1), primitive_type, usage); } - template - void load(std::vector> const & simplices, std::vector const & indices, GLenum usage = gl::STREAM_DRAW) + template + void load(std::vector const & vertices, std::vector> const & simplices, GLenum usage = gl::STREAM_DRAW) { - load(simplices.data(), simplices.size(), indices.data(), indices.size(), usage); + load(vertices.data(), vertices.size(), simplices.data(), simplices.size(), usage); } void draw() const override