2024-03-31 10:11:22 +00:00
|
|
|
#pragma once
|
2022-11-22 21:50:06 +00:00
|
|
|
|
2024-06-01 22:03:39 +00:00
|
|
|
#include <cstdint>
|
|
|
|
|
2022-11-22 21:50:06 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
2023-05-01 12:55:49 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace engine {
|
2022-11-22 21:50:06 +00:00
|
|
|
|
2024-06-04 22:31:22 +00:00
|
|
|
std::unique_ptr<std::vector<char>> readTextFile(const std::string& path);
|
|
|
|
std::unique_ptr<std::vector<uint8_t>> readBinaryFile(const std::string& path);
|
2022-11-22 21:50:06 +00:00
|
|
|
|
2023-05-01 12:55:49 +00:00
|
|
|
// Read an image file into a vector byte buffer. PNG and JPG support at a
|
|
|
|
// minimum. Output format is R8G8B8A8_UINT
|
2024-06-04 22:31:22 +00:00
|
|
|
std::unique_ptr<std::vector<uint8_t>> readImageFile(const std::string& path, int& width, int& height);
|
2023-03-23 19:07:10 +00:00
|
|
|
|
2024-03-31 10:11:22 +00:00
|
|
|
} // namespace engine
|