|
|
@@ -25,12 +25,12 @@ namespace {
|
|
|
}
|
|
|
|
|
|
namespace graphics {
|
|
|
- static detail::texture::format format(int comps) {
|
|
|
+ static textures::format format(int comps) {
|
|
|
switch (comps) {
|
|
|
case 3:
|
|
|
- return detail::texture::format::RGB;
|
|
|
+ return textures::format::RGB;
|
|
|
case 4:
|
|
|
- return detail::texture::format::RGBA;
|
|
|
+ return textures::format::RGBA;
|
|
|
default:
|
|
|
throw;
|
|
|
}
|
|
|
@@ -44,12 +44,12 @@ namespace graphics {
|
|
|
unsigned char * data =
|
|
|
stbi_load(imagefile.c_str(), &size.x(), &size.y(), &components, 0);
|
|
|
scope(exit) { stbi_image_free(data); };
|
|
|
- texture tex{detail::texture::init(format(components), size, data), size};
|
|
|
+ texture tex{textures::init(format(components), size, data), size};
|
|
|
return g_textures.emplace(imagefile, std::move(tex)).first->second;
|
|
|
}
|
|
|
|
|
|
texture texture::create(unsigned char * data, math::vec2i size) {
|
|
|
- return {detail::texture::init(format(4), size, data), size};
|
|
|
+ return {textures::init(format(4), size, data), size};
|
|
|
}
|
|
|
|
|
|
texture::texture(unsigned int id, math::vec2i sz)
|