1 #include "deviceinfo.h"
3 #include "texture2dmultisample.h"
10 void Texture2DMultisample::storage(PixelFormat fmt, unsigned wd, unsigned ht, unsigned sm)
14 if(fmt!=format || wd!=width || ht!=height || sm!=samples)
15 throw incompatible_data("Texture2DMultisample::storage");
19 throw invalid_argument("Texture2DMultisample::storage");
20 if(!sm || sm>DeviceInfo::get_global().limits.max_samples)
21 throw invalid_argument("Texture2DMultisample::storage");
31 void Texture2DMultisample::image(unsigned, const void *)
33 throw invalid_operation("Texture2DMultisample::image");
36 void Texture2DMultisample::image(const Graphics::Image &, unsigned)
38 throw invalid_operation("Texture2DMultisample::image");
41 uint64_t Texture2DMultisample::get_data_size() const
43 return id ? width*height*get_pixel_size(format)*samples : 0;