+ return id ? width*height*depth*get_pixel_size(storage_fmt) : 0;
+}
+
+
+Texture3D::Loader::Loader(Texture3D &t):
+ DataFile::DerivedObjectLoader<Texture3D, Texture::Loader>(t)
+{
+ init();
+}
+
+Texture3D::Loader::Loader(Texture3D &t, Collection &c):
+ DataFile::DerivedObjectLoader<Texture3D, Texture::Loader>(t, c)
+{
+ init();
+}
+
+void Texture3D::Loader::init()
+{
+ add("raw_data", &Loader::raw_data);
+ add("storage", &Loader::storage);
+ add("storage", &Loader::storage_levels);
+}
+
+void Texture3D::Loader::raw_data(const string &data)
+{
+ obj.image(0, data.data());
+}
+
+void Texture3D::Loader::storage(PixelFormat fmt, unsigned w, unsigned h, unsigned d)
+{
+ obj.storage(fmt, w, h, d);
+}
+
+void Texture3D::Loader::storage_levels(PixelFormat fmt, unsigned w, unsigned h, unsigned d, unsigned l)
+{
+ obj.storage(fmt, w, h, d, l);