X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture3d.cpp;h=61c745bb95bf4d8ae3df56c1c94c7aec43a686f7;hb=4d7f66ea28c788e12f700216b9c53af9e71b8390;hp=3846ef1c1294e18d78b183e4208366648c76a46f;hpb=8ed7051d1a80c7e8b198d96575338eee6a5e2485;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