]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture2d.cpp
Unmanage texture if loading data directly
[libs/gl.git] / source / core / texture2d.cpp
index 0f06790c06056f419f6f50766db8a4eb975793f3..6e7d97202f341cc12e2a76d9e94b92f840c3ff94 100644 (file)
@@ -230,6 +230,12 @@ void Texture2D::Loader::init()
 
 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());
 }