|
|
@@ -51,10 +51,16 @@ namespace graphics {
|
|
|
return g_textures.emplace(imagefile, std::move(tex)).first->second;
|
|
|
}
|
|
|
|
|
|
- texture texture::create(unsigned char * data, math::vec2i size) {
|
|
|
+ texture texture::create(char const * data, math::vec2i size) {
|
|
|
return {textures::init(format(4), size, data), size};
|
|
|
}
|
|
|
|
|
|
texture::texture(unsigned int id, math::vec2i sz)
|
|
|
: identity<graphics::texture>(id), size(sz) {}
|
|
|
+
|
|
|
+ texture const texture::WHITE = texture::create("\xFF\xFF\xFF\xFF", {{1, 1}});
|
|
|
+ texture const texture::DARK_YELLOW =
|
|
|
+ texture::create("\x80\x80\x00\xFF", {{1, 1}});
|
|
|
+ texture const texture::LIGHT_BLUE =
|
|
|
+ texture::create("\x80\x80\xFF\xFF", {{1, 1}});
|
|
|
}
|