Otherwise the resource manager won't have a load location for the texture
and will throw an exception.
Also generate ID if it hasn't been done yet.
void Texture::Loader::image_data(const string &data)
{
+ if(obj.manager)
+ {
+ obj.set_manager(0);
+ if(!obj.id)
+ obj.generate_id();
+ }
+
Graphics::Image img;
IO::Memory mem(data.data(), data.size());
img.load_io(mem);
void Texture2D::Loader::raw_data(const string &data)
{
+ if(obj.manager)
+ {
+ obj.set_manager(0);
+ if(!obj.id)
+ obj.generate_id();
+ }
obj.image(0, data.data());
}