mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Expose more compression formats in Image and fix compress check
Check for compressing ASTC checked if the function for BPTC was present
(cherry picked from commit cf64e2fa47)
This commit is contained in:
parent
ccc761dd93
commit
3445fa7dbc
2 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue