- const char *pixels = reinterpret_cast<const char *>(img.get_pixels());
- unsigned face_size = img.get_stride()*size;
- for(unsigned i=0; i<6; ++i)
- image(static_cast<TextureCubeFace>(i), 0, pixels+i*face_size);
-}
-
-unsigned TextureCube::get_n_levels() const
-{
- unsigned n = 0;
- for(unsigned s=size; s; s>>=1, ++n) ;
- return n;