return width>>level;
}
-uint64_t Texture1D::get_data_size() const
-{
- return id ? width*get_pixel_size(storage_fmt) : 0;
-}
-
Texture1D::Loader::Loader(Texture1D &t):
DataFile::DerivedObjectLoader<Texture1D, Texture::Loader>(t)
void Texture1D::Loader::init()
{
- add("raw_data", &Loader::raw_data);
add("storage", &Loader::storage);
add("storage", &Loader::storage_levels);
}
-void Texture1D::Loader::raw_data(const string &data)
-{
- obj.image(0, data.data());
-}
-
void Texture1D::Loader::storage(PixelFormat fmt, unsigned w)
{
obj.storage(fmt, w);