X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture1d.cpp;h=f700d013b5dc6a55f88196695b8a8ec83b2242b9;hb=4d7f66ea28c788e12f700216b9c53af9e71b8390;hp=bcebca49565131eb738ba471af992cbe0e05c1a9;hpb=744dced516f11d072dc6176fdf2df7e464b9782e;p=libs%2Fgl.git diff --git a/source/texture1d.cpp b/source/texture1d.cpp index bcebca49..f700d013 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -9,6 +9,7 @@ namespace GL { Texture1D::Texture1D(): Texture(GL_TEXTURE_1D), + ifmt(RGB), width(0), allocated(0) { } @@ -56,5 +57,10 @@ unsigned Texture1D::get_level_size(unsigned level) return width>>level; } +UInt64 Texture1D::get_data_size() const +{ + return id ? width*get_pixel_size(ifmt) : 0; +} + } // namespace GL } // namespace Msp