We be kinda rendering

This commit is contained in:
2026-01-05 06:20:49 +01:00
parent 1168f9e5d1
commit c83c423b42
48 changed files with 2789 additions and 382 deletions

View File

@@ -0,0 +1,36 @@
#ifndef IMAGELOADER_H
#define IMAGELOADER_H
#include <filesystem>
struct ImageData {
ImageData() = default;
~ImageData();
// move only
ImageData(ImageData&& o) = default;
ImageData& operator=(ImageData&& o) = default;
// no copies
ImageData(const ImageData& o) = delete;
ImageData& operator=(const ImageData& o) = delete;
// data
unsigned char* pixels{nullptr};
int width{0};
int height{0};
int channels{0};
// HDR only
float* hdrPixels{nullptr};
bool hdr{false};
int comp{0};
bool shouldSTBFree{false};
};
namespace util {
ImageData loadImage(const std::filesystem::path& p);
}
#endif //IMAGELOADER_H