Make gfx::gltf_mesh::mesh::primitive::draw const
This commit is contained in:
parent
13590ff9e5
commit
c980e72e14
2 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ namespace psemek::gfx
|
||||||
std::size_t index_offset;
|
std::size_t index_offset;
|
||||||
GLenum index_type;
|
GLenum index_type;
|
||||||
|
|
||||||
void draw();
|
void draw() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<primitive> primitives;
|
std::vector<primitive> primitives;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
namespace psemek::gfx
|
namespace psemek::gfx
|
||||||
{
|
{
|
||||||
|
|
||||||
void gltf_mesh::mesh::primitive::draw()
|
void gltf_mesh::mesh::primitive::draw() const
|
||||||
{
|
{
|
||||||
vao.bind();
|
vao.bind();
|
||||||
gl::DrawElements(gl::TRIANGLES, index_count, index_type, reinterpret_cast<void const *>(index_offset));
|
gl::DrawElements(gl::TRIANGLES, index_count, index_type, reinterpret_cast<void const *>(index_offset));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue