Merge pull request #76016 from AThousandShips/image_compress

[3.x] Expose more compression formats in Image
This commit is contained in:
Rémi Verschelde 2023-04-17 17:25:37 +02:00
commit 78739f7266
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 8 additions and 0 deletions

View file

@ -3031,6 +3031,8 @@ void Image::_bind_methods() {
BIND_ENUM_CONSTANT(COMPRESS_PVRTC4);
BIND_ENUM_CONSTANT(COMPRESS_ETC);
BIND_ENUM_CONSTANT(COMPRESS_ETC2);
BIND_ENUM_CONSTANT(COMPRESS_BPTC);
BIND_ENUM_CONSTANT(COMPRESS_MAX);
BIND_ENUM_CONSTANT(COMPRESS_SOURCE_GENERIC);
BIND_ENUM_CONSTANT(COMPRESS_SOURCE_SRGB);

View file

@ -602,6 +602,12 @@
<constant name="COMPRESS_ETC2" value="4" enum="CompressMode">
Use ETC2 compression.
</constant>
<constant name="COMPRESS_BPTC" value="5" enum="CompressMode">
Use BPTC compression.
</constant>
<constant name="COMPRESS_MAX" value="6" enum="CompressMode">
Represents the size of the [enum CompressMode] enum.
</constant>
<constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource">
Source texture (before compression) is a regular texture. Default for all textures.
</constant>