lol/src/Drawable.cpp
2021-12-24 14:20:53 +01:00

20 lines
313 B
C++

#include <lol/Drawable.hpp>
namespace lol
{
void Drawable::Draw(const CameraBase& camera) const
{
shader->Bind();
vao->Bind();
PreRender(camera);
glDrawElements(NATIVE(type), vao->GetIndexCount(), GL_UNSIGNED_INT, nullptr);
}
void Drawable::SetDrawMode(DrawMode type)
{
this->type = type;
}
}