23 lines
426 B
C++
23 lines
426 B
C++
#pragma once
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
namespace renderive {
|
|
|
|
enum class Pixel_Format : std::uint8_t {
|
|
Premultiplied_32
|
|
};
|
|
|
|
struct Image_View {
|
|
const std::byte* data{};
|
|
int width{};
|
|
int height{};
|
|
int stride{};
|
|
Pixel_Format format = Pixel_Format::Premultiplied_32;
|
|
[[nodiscard]] bool empty() const {
|
|
return !data || width <= 0 || height <= 0;
|
|
}
|
|
};
|
|
|
|
} // namespace renderive
|