]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.cpp
Use set_manager instead of passing the manager to the constructor
[libs/gl.git] / source / core / texture.cpp
index 85f5fb5836ebdcdb56af17191343a9c2f21be9ea..568479a6d7fd9d187b3a9805af63591283bc9239 100644 (file)
@@ -8,17 +8,14 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-Texture::Texture(unsigned t, ResourceManager *m):
-       TextureBackend(t, !m),
+Texture::Texture(unsigned t):
+       TextureBackend(t),
        format(NO_PIXELFORMAT),
        storage_fmt(format),
        swizzle(NO_SWIZZLE),
        use_srgb_format(false),
        auto_gen_mipmap(false)
-{
-       if(m)
-               set_manager(m);
-}
+{ }
 
 void Texture::set_format(PixelFormat fmt)
 {
@@ -122,11 +119,7 @@ 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());