feat: add more image types to load from cooked files
This commit is contained in:
@@ -14,6 +14,7 @@ namespace TextureFile {
|
||||
|
||||
enum class PixelFormat : std::uint32_t {
|
||||
RGBA16Float,
|
||||
RGBA8,
|
||||
};
|
||||
|
||||
struct Texture {
|
||||
@@ -26,6 +27,7 @@ namespace TextureFile {
|
||||
[[nodiscard]] std::size_t BytesPerPixel(PixelFormat format);
|
||||
|
||||
[[nodiscard]] Texture FromRGBA32Float(std::uint32_t width, std::uint32_t height, std::span<const float> rgba);
|
||||
[[nodiscard]] Texture FromRGBA8(std::uint32_t width, std::uint32_t height, std::span<const std::uint8_t> rgba);
|
||||
|
||||
[[nodiscard]] std::vector<std::uint8_t> Write(const Texture& texture);
|
||||
[[nodiscard]] Texture Read(std::span<const std::uint8_t> bytes);
|
||||
|
||||
Reference in New Issue
Block a user