diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-16 19:12:00 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-16 19:12:00 -0300 |
commit | f141f747de7045dcc4cbb6643ce5c38393ab3625 (patch) | |
tree | 587a521ca2829d9fe36507577102f8d9a0183801 /core/image.cpp | |
parent | 9e85d17241228b02e3bd500b48084a584bc04905 (diff) | |
download | redot-engine-f141f747de7045dcc4cbb6643ce5c38393ab3625.tar.gz |
Fix Squish decompression, closes #18109
Diffstat (limited to 'core/image.cpp')
-rw-r--r-- | core/image.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/image.cpp b/core/image.cpp index 172f5e517a..698a0b0b98 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1766,6 +1766,15 @@ int Image::get_image_required_mipmaps(int p_width, int p_height, Format p_format return mm; } +int Image::get_image_mipmap_offset(int p_width, int p_height, Format p_format, int p_mipmap) { + + if (p_mipmap <= 0) { + return 0; + } + int mm; + return _get_dst_image_size(p_width, p_height, p_format, mm, p_mipmap - 1); +} + bool Image::is_compressed() const { return format > FORMAT_RGBE9995; } |