TextureCube::TextureCube():
Texture(GL_TEXTURE_CUBE_MAP),
+ ifmt(RGB),
size(0),
allocated(0)
{
allocated |= 1<<level;
if(gen_mipmap && level==0)
{
+ // TODO Only do this once all faces are created
+ auto_generate_mipmap();
for(; s; s>>=1, ++level) ;
allocated |= (1<<level)-1;
}
return fv+s*sv+t*tv;
}
+UInt64 TextureCube::get_data_size() const
+{
+ return id ? size*size*6*get_pixel_size(ifmt) : 0;
+}
+
TextureCube::Loader::Loader(TextureCube &t):
DataFile::DerivedObjectLoader<TextureCube, Texture::Loader>(t)