Add pipeline cache

This commit is contained in:
Guillaume Meunier
2024-01-28 11:33:32 +01:00
parent d0047d6da5
commit 1ce83568eb
7 changed files with 112 additions and 32 deletions
+2 -9
View File
@@ -19,6 +19,7 @@
#include "asset.h"
#include "application.h"
#include "utils/files.h"
#include <filesystem>
#include <fstream>
#include <spdlog/spdlog.h>
@@ -84,15 +85,7 @@ asset::asset(const std::filesystem::path& path)
spdlog::debug("Loading file asset {}", path.string());
std::ifstream file(asset_root() / path, std::ios::binary | std::ios::ate);
file.exceptions(std::ios_base::badbit | std::ios_base::failbit);
size_t size = file.tellg();
file.seekg(0);
bytes.resize(size);
file.read(reinterpret_cast<char *>(bytes.data()), size);
bytes = utils::read_whole_file<std::byte>(asset_root() / path);
}
#endif