engine/include/util/files.hpp

17 lines
477 B
C++
Raw Normal View History

2022-11-22 21:50:06 +00:00
#pragma once
#include <memory>
#include <vector>
#include <string>
namespace engine::util {
std::unique_ptr<std::vector<char>> readTextFile(const std::string& path);
2022-11-23 16:20:08 +00:00
std::unique_ptr<std::vector<uint8_t>> readBinaryFile(const std::string& path);
2023-03-23 19:07:10 +00:00
// Read an image file into a vector byte buffer. PNG and JPG support at a minimum.
// Output format is R8G8B8A8_UINT
2022-12-15 15:54:11 +00:00
std::unique_ptr<std::vector<uint8_t>> readImageFile(const std::string& path, int *width, int *height);
2022-11-22 21:50:06 +00:00
}