2021-12-23 00:45:24 +01:00
|
|
|
#include <lol/Drawable.hpp>
|
2021-12-23 00:25:50 +01:00
|
|
|
|
2021-12-23 00:51:59 +01:00
|
|
|
namespace lol
|
2021-12-23 00:25:50 +01:00
|
|
|
{
|
|
|
|
|
2021-12-23 00:51:59 +01: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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|