#pragma once #include "Drawable.h" #include #include void Drawable::Draw(Graphics& gfx) const noexcept { for (auto& b : binds) { b->Bind(gfx); } gfx.DrawIndexed(pIndexBuffer->GetCount()); } void Drawable::AddBind(std::unique_ptr bind) noexcept { binds.push_back(std::move(bind)); } void Drawable::AddIndexBuffer(std::unique_ptr ibuf) noexcept { assert("Attempting to add index buffer a second time" && pIndexBuffer == nullptr); pIndexBuffer = ibuf.get(); binds.push_back(std::move(ibuf)); }