Fixing staging buffers not getting deleted

remove vgcore
This commit is contained in:
2023-11-06 15:08:27 +01:00
parent d35f7acddc
commit 4c567b60f3
69 changed files with 505 additions and 304 deletions
+9 -9
View File
@@ -27,6 +27,14 @@ public:
{
return (deps | ...);
}
void setupView(Dependencies<>, dp::thread_pool<>&)
{
registry.view<Components...>().each([&](Components&... comp){
//pool.enqueue_detach([&](){
update(comp...);
//});
});
}
template<typename... Deps>
void setupView(Dependencies<Deps...>, dp::thread_pool<>&)
{
@@ -37,20 +45,12 @@ public:
//});
});
}
template<>
void setupView(Dependencies<>, dp::thread_pool<>&)
{
registry.view<Components...>().each([&](Components&... comp){
//pool.enqueue_detach([&](){
update(comp...);
//});
});
}
virtual void run(dp::thread_pool<>& pool, double delta) override
{
SystemBase::run(pool, delta);
setupView(mergeDependencies((getDependencies<Components>(),...)), pool);
}
virtual void update() {}
virtual void update(Components&... components) = 0;
};
} // namespace System
+5 -2
View File
@@ -12,7 +12,10 @@ MeshUpdater::~MeshUpdater()
{
}
void MeshUpdater::update(Component::Transform& transform, Component::Mesh& mesh)
void MeshUpdater::update(Component::Transform& transform, Component::Mesh& meshComp)
{
mesh.vertexData->updateMesh(transform, mesh);
for(const auto& mesh : meshComp.asset->meshes)
{
mesh->vertexData->updateMesh(transform, mesh);
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ class SystemBase
public:
SystemBase(PScene scene) : registry(scene->registry), scene(scene) {}
virtual ~SystemBase() {}
virtual void run(dp::thread_pool<>& pool, double delta)
virtual void run(dp::thread_pool<>&, double delta)
{
deltaTime = delta;
update();