]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture2dmultisample.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / core / texture2dmultisample.cpp
index ce35bdb795afb5487c226856eabf94b9f945d316..08e7168afd251d5a4379d17d52383417de546706 100644 (file)
@@ -1,4 +1,4 @@
-#include "deviceinfo.h"
+#include "device.h"
 #include "error.h"
 #include "texture2dmultisample.h"
 
@@ -17,13 +17,14 @@ void Texture2DMultisample::storage(PixelFormat fmt, unsigned wd, unsigned ht, un
        }
        if(wd==0 || ht==0)
                throw invalid_argument("Texture2DMultisample::storage");
-       if(!sm || sm>DeviceInfo::get_global().limits.max_samples)
+       if(!sm || sm>Device::get_current().get_info().limits.max_samples)
                throw invalid_argument("Texture2DMultisample::storage");
 
        set_format(fmt);
        width = wd;
        height = ht;
        samples = sm;
+       n_levels = 1;
 
        allocate();
 }
@@ -38,10 +39,5 @@ void Texture2DMultisample::image(const Graphics::Image &, unsigned)
        throw invalid_operation("Texture2DMultisample::image");
 }
 
-uint64_t Texture2DMultisample::get_data_size() const
-{
-       return id ? width*height*get_pixel_size(format)*samples : 0;
-}
-
 } // namespace GL
 } // namespace Msp