29 lines
563 B
C++
29 lines
563 B
C++
#pragma once
|
|
|
|
#include "assets/components/texture_components.hpp"
|
|
#include "assets/data/texture_data.hpp"
|
|
|
|
namespace assets
|
|
{
|
|
|
|
struct fallback_color
|
|
{
|
|
static constexpr auto components = (
|
|
texture_components::flags::red |
|
|
texture_components::flags::green |
|
|
texture_components::flags::blue
|
|
);
|
|
texture_data::value_type r, g, b;
|
|
};
|
|
|
|
texture_data generate_fallback_texture(
|
|
int width = 4,
|
|
int height = 4,
|
|
std::span<const fallback_color> colors = std::array{
|
|
fallback_color{ .r = 255, .g = 0, b = 255 },
|
|
fallback_color{ .r = 0, .g = 0, b = 0 }
|
|
}
|
|
);
|
|
|
|
}
|