X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture3d.cpp;h=61c745bb95bf4d8ae3df56c1c94c7aec43a686f7;hb=00d3ccedefb1a5efb3d2d4625a2b68446703fbab;hp=3846ef1c1294e18d78b183e4208366648c76a46f;hpb=f33a98b1a044c8ac7b12778cbca6c4a124875e4a;p=libs%2Fgl.git diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 3846ef1c..61c745bb 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -13,6 +13,7 @@ namespace GL { Texture3D::Texture3D(): Texture(GL_TEXTURE_3D), + ifmt(RGB), width(0), height(0), depth(0), @@ -135,5 +136,10 @@ void Texture3D::get_level_size(unsigned level, unsigned &w, unsigned &h, unsigne d = 1; } +UInt64 Texture3D::get_data_size() const +{ + return id ? width*height*depth*get_pixel_size(ifmt) : 0; +} + } // namespace GL } // namespace Msp