Texture2D::Texture2D(ResourceManager *m):
Texture(GL_TEXTURE_2D, m),
+ ifmt(RGB),
width(0),
height(0),
allocated(0)
return new AsyncLoader(*this, io);
}
+UInt64 Texture2D::get_data_size() const
+{
+ return id ? width*height*get_component_count(ifmt) : 0;
+}
+
void Texture2D::unload()
{
glDeleteTextures(1, &id);