X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Ftexture3d_backend.cpp;h=0796472a041de543d67239591928d393fbc97678;hp=d2c1088e293964b10deb45874f083063146aea88;hb=f73e671dcb36c097647cddbf5b1eaaad2ffc9299;hpb=9e63512930bc7dace6dc169c65161961e5dcfcf6 diff --git a/source/backends/opengl/texture3d_backend.cpp b/source/backends/opengl/texture3d_backend.cpp index d2c1088e..0796472a 100644 --- a/source/backends/opengl/texture3d_backend.cpp +++ b/source/backends/opengl/texture3d_backend.cpp @@ -74,5 +74,13 @@ bool OpenGLTexture3D::is_array() const return target==GL_TEXTURE_2D_ARRAY; } +size_t OpenGLTexture3D::get_data_size() const +{ + unsigned width = static_cast(this)->width; + unsigned height = static_cast(this)->height; + unsigned depth = static_cast(this)->depth; + return id ? width*height*depth*get_pixel_size(storage_fmt) : 0; +} + } // namespace GL } // namespace Msp