Sampler2D::Sampler2D(const std::string &filename, u32 s){ settings = s; ImageLoader loader; ImageData image = loader.loadTrueRaw(filename); width = image.width; height = image.height; info("SAMPLER", "from:", filename, width, ":", height); switch(image.originalFormat){ case gl::RED : data = make_unique<SamplerSingleChannelU8>(image.data, image.width, image.height); break; case gl::BGR : break; case gl::BGRA : break; }; }