]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture3d.cpp
Support samplers as independent objects
[libs/gl.git] / source / texture3d.cpp
index 667f8c31c1ede8dfe9c1896159eaa263385738be..1f62e050db9897ccc8dcff5511efbe94a0f6fb83 100644 (file)
@@ -142,22 +142,11 @@ void Texture3D::image(const Graphics::Image &img, unsigned lv)
 {
        unsigned w = img.get_width();
        unsigned h = img.get_height();
-       unsigned d = 1;
 
-       if(depth)
-       {
-               if(h%depth)
-                       throw incompatible_data("Texture3D::load_image");
-               h /= depth;
-               d = depth;
-       }
-       else
-       {
-               if(h%w)
-                       throw incompatible_data("Texture3D::load_image");
-               d = h/w;
-               h = w;
-       }
+       if(h%w)
+               throw incompatible_data("Texture3D::load_image");
+       unsigned d = h/w;
+       h = w;
 
        PixelFormat fmt = pixelformat_from_image(img);
        if(width==0)