From: Mikko Rasa Date: Thu, 3 Nov 2016 08:29:08 +0000 (+0200) Subject: Fix Texture2D::get_data_size to use get_pixel_size X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=fcaae0500d5c6fa842babe37450c435e4178547a Fix Texture2D::get_data_size to use get_pixel_size --- diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 75b84ec7..e15f9a33 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -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()