summaryrefslogtreecommitdiffstats
path: root/core/io/image.cpp
diff options
context:
space:
mode:
authorNinni Pipping <over999ships@gmail.com>2023-04-13 09:39:03 +0200
committerNinni Pipping <over999ships@gmail.com>2023-04-13 09:39:03 +0200
commitcf64e2fa479ce548713c589d9c3252e5ac36a6d3 (patch)
tree8363bff292e30cab777165894a2fd7c0b0d4141f /core/io/image.cpp
parent5860b02b63943bd5c75c14244cb6b92fd4382ccc (diff)
downloadredot-engine-cf64e2fa479ce548713c589d9c3252e5ac36a6d3.tar.gz
Expose more compression formats in Image and fix compress check
Check for compressing ASTC checked if the function for BPTC was present
Diffstat (limited to 'core/io/image.cpp')
-rw-r--r--core/io/image.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 736a3ec82e..8111ca447c 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -2649,7 +2649,7 @@ Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels
_image_compress_bptc_func(this, p_channels);
} break;
case COMPRESS_ASTC: {
- ERR_FAIL_COND_V(!_image_compress_bptc_func, ERR_UNAVAILABLE);
+ ERR_FAIL_COND_V(!_image_compress_astc_func, ERR_UNAVAILABLE);
_image_compress_astc_func(this, p_astc_format);
} break;
case COMPRESS_MAX: {
@@ -3535,6 +3535,8 @@ void Image::_bind_methods() {
BIND_ENUM_CONSTANT(COMPRESS_ETC);
BIND_ENUM_CONSTANT(COMPRESS_ETC2);
BIND_ENUM_CONSTANT(COMPRESS_BPTC);
+ BIND_ENUM_CONSTANT(COMPRESS_ASTC);
+ BIND_ENUM_CONSTANT(COMPRESS_MAX);
BIND_ENUM_CONSTANT(USED_CHANNELS_L);
BIND_ENUM_CONSTANT(USED_CHANNELS_LA);