Make gfx::gltf_mesh::mesh::primitive::draw const

This commit is contained in:
Nikita Lisitsa 2023-01-07 02:46:40 +03:00
parent 13590ff9e5
commit c980e72e14
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ namespace psemek::gfx
std::size_t index_offset;
GLenum index_type;
void draw();
void draw() const;
};
std::vector<primitive> primitives;

View file

@ -5,7 +5,7 @@
namespace psemek::gfx
{
void gltf_mesh::mesh::primitive::draw()
void gltf_mesh::mesh::primitive::draw() const
{
vao.bind();
gl::DrawElements(gl::TRIANGLES, index_count, index_type, reinterpret_cast<void const *>(index_offset));