2021-12-22 23:45:24 +00:00
|
|
|
#include <lol/Drawable.hpp>
|
2021-12-22 23:25:50 +00:00
|
|
|
|
2021-12-22 23:51:59 +00:00
|
|
|
namespace lol
|
2021-12-22 23:25:50 +00:00
|
|
|
{
|
|
|
|
|
2021-12-22 23:51:59 +00:00
|
|
|
void Drawable::Draw(const CameraBase& camera) const
|
|
|
|
{
|
|
|
|
shader->Use();
|
|
|
|
PreRender(camera);
|
|
|
|
vao->Render(static_cast<unsigned int>(type));
|
|
|
|
}
|
|
|
|
|
|
|
|
void Drawable::SetPrimitiveType(PrimitiveType type)
|
|
|
|
{
|
|
|
|
this->type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|