]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture3d_backend.cpp
Move the Resource function override of Texture classes into backend
[libs/gl.git] / source / backends / opengl / texture3d_backend.cpp
index d2c1088e293964b10deb45874f083063146aea88..0796472a041de543d67239591928d393fbc97678 100644 (file)
@@ -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<const Texture3D *>(this)->width;
+       unsigned height = static_cast<const Texture3D *>(this)->height;
+       unsigned depth = static_cast<const Texture3D *>(this)->depth;
+       return id ? width*height*depth*get_pixel_size(storage_fmt) : 0;
+}
+
 } // namespace GL
 } // namespace Msp