]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix Texture2D::get_data_size to use get_pixel_size
authorMikko Rasa <tdb@tdb.fi>
Thu, 3 Nov 2016 08:29:08 +0000 (10:29 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 3 Nov 2016 08:29:08 +0000 (10:29 +0200)
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()