Добавил UniformBuffer. Это умный указатель на память в GPU, но он так же берёт на себя задачу выделения памяти

This commit is contained in:
Jiga228
2026-07-11 17:59:50 +07:00
parent c95aa557c2
commit 506776b6d6
6 changed files with 132 additions and 39 deletions
+36 -9
View File
@@ -86,9 +86,18 @@ R"(
std::vector<std::weak_ptr<Actor>> actors = tmp_core.GetGameInstance()->GetWorld()->GetActorsByClass<Actor>();
ASSERT_EQ(actors.size(), 2);
std::filesystem::remove("Worlds/tests.world");
std::filesystem::remove("Worlds");
std::filesystem::remove("main_config.conf");
try {
std::filesystem::remove("main_config.conf");
}
catch (...) {}
try {
std::filesystem::remove("Worlds/tests.world");
}
catch (...) {}
try {
std::filesystem::remove("Worlds");
}
catch (...) {}
}
TEST(World, check_finders)
@@ -187,9 +196,18 @@ R"(
ASSERT_EQ(actor_by_name.expired(), false);
ASSERT_EQ(*actor_by_name.lock()->GetTags().begin(), "Simple");
std::filesystem::remove("Worlds/tests.world");
std::filesystem::remove("Worlds");
std::filesystem::remove("main_config.conf");
try {
std::filesystem::remove("main_config.conf");
}
catch (...) {}
try {
std::filesystem::remove("Worlds/tests.world");
}
catch (...) {}
try {
std::filesystem::remove("Worlds");
}
catch (...) {}
}
TEST(World, check_spawn_actor_from_class)
@@ -232,7 +250,16 @@ R"(
test_actors = tmp_core.GetGameInstance()->GetWorld()->GetActorsByClass<TestActor>();
ASSERT_EQ(test_actors.size(), 1);
std::filesystem::remove("Worlds/tests.world");
std::filesystem::remove("Worlds");
std::filesystem::remove("main_config.conf");
try {
std::filesystem::remove("main_config.conf");
}
catch (...) {}
try {
std::filesystem::remove("Worlds/tests.world");
}
catch (...) {}
try {
std::filesystem::remove("Worlds");
}
catch (...) {}
}