]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.cpp
Unmanage texture if loading data directly
[libs/gl.git] / source / core / texture.cpp
index 3eb48b8b2eb426dafebd1791ab11d4fba09b4c63..354c1b12d5307b53113c0ae7080f2635c3e0f3a9 100644 (file)
@@ -361,6 +361,13 @@ void Texture::Loader::generate_mipmap(bool gm)
 
 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);