Allow simple drawable to define its draw phase

This commit is contained in:
Georg Hagen
2024-07-22 14:19:53 +02:00
parent e68fe06139
commit 06e6623050

View File

@@ -21,10 +21,12 @@ namespace OpenVulkano::Scene
UniformBuffer* m_uniBuffer = nullptr;
public:
SimpleDrawable() : Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>()) {}
SimpleDrawable(const DrawPhase phase = DrawPhase::MAIN)
: Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>(), phase)
{}
explicit SimpleDrawable(const SimpleDrawable* toCopy)
: Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>())
: Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>(), toCopy->GetDrawPhase())
, m_mesh(toCopy->m_mesh)
, m_material(toCopy->m_material)
, m_uniBuffer(toCopy->m_uniBuffer)