]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.cpp
Fix Texture2D::get_data_size to use get_pixel_size
[libs/gl.git] / source / texture2d.cpp
index 75b84ec7bbe5747c17ee47b137ba56df33e9101e..e15f9a33562d1e1527ba3c5d76905db437945c7f 100644 (file)
@@ -171,7 +171,7 @@ Resource::AsyncLoader *Texture2D::load(IO::Seekable &io, const Resources *res)
 
 UInt64 Texture2D::get_data_size() const
 {
-       return id ? width*height*get_component_count(ifmt) : 0;
+       return id ? width*height*get_pixel_size(ifmt) : 0;
 }
 
 void Texture2D::unload()