Change shader handling

This commit is contained in:
2023-08-04 20:20:20 +02:00
parent 4dac821abb
commit 836e9dce42
13 changed files with 71 additions and 23 deletions

View File

@@ -19,20 +19,23 @@ namespace openVulkanoCpp::Scene
Material* m_material = nullptr;
public:
SimpleDrawable() : Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>()) {}
SimpleDrawable() : Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>())
{}
explicit SimpleDrawable(const SimpleDrawable* toCopy)
: Drawable(DrawEncoder::GetDrawEncoder<SimpleDrawable>())
, m_mesh(toCopy->m_mesh)
, m_material(toCopy->m_material)
{}
{
SetShader(toCopy->GetShader());
}
~SimpleDrawable()
{
if (m_mesh) SimpleDrawable::Close();
}
void Init(Geometry* mesh, Material* material);
void Init(Shader* shader, Geometry* mesh, Material* material);
void Init(SimpleDrawable* drawable);