}
}
+size_t OpenGLTexture1D::get_data_size() const
+{
+ if(!id)
+ return 0;
+
+ unsigned width = static_cast<const Texture1D *>(this)->width;
+ unsigned levels = static_cast<const Texture1D *>(this)->levels;
+
+ size_t level_size = width*get_pixel_size(storage_fmt);
+ size_t total_size = level_size;
+ for(unsigned i=0; i<levels; ++i, level_size>>=2)
+ total_size += level_size;
+ return total_size;
+}
+
} // namespace GL
} // namespace Msp