summaryrefslogtreecommitdiff
path: root/core/image.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-21 19:56:08 -0300
committerGitHub <noreply@github.com>2017-08-21 19:56:08 -0300
commit2cc83092498d3b82fa8a3aba37c32ad887d19c2c (patch)
tree4d2def0a62847170a86c3f134f234af8ae45f0b9 /core/image.cpp
parent92410df24cdf296ad63250274d69b2019996423e (diff)
parent32dd9a9f668db31e348c5ef5bc181cdb91c07299 (diff)
Merge pull request #10351 from neikeq/enums-are-for-the-weak
ClassDB: Provide the enum name of integer constants
Diffstat (limited to 'core/image.cpp')
-rw-r--r--core/image.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/core/image.cpp b/core/image.cpp
index a4864458b5..91572e44e4 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -2275,62 +2275,62 @@ void Image::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "_set_data", "_get_data");
- BIND_CONSTANT(FORMAT_L8); //luminance
- BIND_CONSTANT(FORMAT_LA8); //luminance-alpha
- BIND_CONSTANT(FORMAT_R8);
- BIND_CONSTANT(FORMAT_RG8);
- BIND_CONSTANT(FORMAT_RGB8);
- BIND_CONSTANT(FORMAT_RGBA8);
- BIND_CONSTANT(FORMAT_RGBA4444);
- BIND_CONSTANT(FORMAT_RGBA5551);
- BIND_CONSTANT(FORMAT_RF); //float
- BIND_CONSTANT(FORMAT_RGF);
- BIND_CONSTANT(FORMAT_RGBF);
- BIND_CONSTANT(FORMAT_RGBAF);
- BIND_CONSTANT(FORMAT_RH); //half float
- BIND_CONSTANT(FORMAT_RGH);
- BIND_CONSTANT(FORMAT_RGBH);
- BIND_CONSTANT(FORMAT_RGBAH);
- BIND_CONSTANT(FORMAT_RGBE9995);
- BIND_CONSTANT(FORMAT_DXT1); //s3tc bc1
- BIND_CONSTANT(FORMAT_DXT3); //bc2
- BIND_CONSTANT(FORMAT_DXT5); //bc3
- BIND_CONSTANT(FORMAT_RGTC_R);
- BIND_CONSTANT(FORMAT_RGTC_RG);
- BIND_CONSTANT(FORMAT_BPTC_RGBA); //btpc bc6h
- BIND_CONSTANT(FORMAT_BPTC_RGBF); //float /
- BIND_CONSTANT(FORMAT_BPTC_RGBFU); //unsigned float
- BIND_CONSTANT(FORMAT_PVRTC2); //pvrtc
- BIND_CONSTANT(FORMAT_PVRTC2A);
- BIND_CONSTANT(FORMAT_PVRTC4);
- BIND_CONSTANT(FORMAT_PVRTC4A);
- BIND_CONSTANT(FORMAT_ETC); //etc1
- BIND_CONSTANT(FORMAT_ETC2_R11); //etc2
- BIND_CONSTANT(FORMAT_ETC2_R11S); //signed ); NOT srgb.
- BIND_CONSTANT(FORMAT_ETC2_RG11);
- BIND_CONSTANT(FORMAT_ETC2_RG11S);
- BIND_CONSTANT(FORMAT_ETC2_RGB8);
- BIND_CONSTANT(FORMAT_ETC2_RGBA8);
- BIND_CONSTANT(FORMAT_ETC2_RGB8A1);
- BIND_CONSTANT(FORMAT_MAX);
-
- BIND_CONSTANT(INTERPOLATE_NEAREST);
- BIND_CONSTANT(INTERPOLATE_BILINEAR);
- BIND_CONSTANT(INTERPOLATE_CUBIC);
-
- BIND_CONSTANT(ALPHA_NONE);
- BIND_CONSTANT(ALPHA_BIT);
- BIND_CONSTANT(ALPHA_BLEND);
-
- BIND_CONSTANT(COMPRESS_S3TC);
- BIND_CONSTANT(COMPRESS_PVRTC2);
- BIND_CONSTANT(COMPRESS_PVRTC4);
- BIND_CONSTANT(COMPRESS_ETC);
- BIND_CONSTANT(COMPRESS_ETC2);
-
- BIND_CONSTANT(COMPRESS_SOURCE_GENERIC);
- BIND_CONSTANT(COMPRESS_SOURCE_SRGB);
- BIND_CONSTANT(COMPRESS_SOURCE_NORMAL);
+ BIND_ENUM_CONSTANT(FORMAT_L8); //luminance
+ BIND_ENUM_CONSTANT(FORMAT_LA8); //luminance-alpha
+ BIND_ENUM_CONSTANT(FORMAT_R8);
+ BIND_ENUM_CONSTANT(FORMAT_RG8);
+ BIND_ENUM_CONSTANT(FORMAT_RGB8);
+ BIND_ENUM_CONSTANT(FORMAT_RGBA8);
+ BIND_ENUM_CONSTANT(FORMAT_RGBA4444);
+ BIND_ENUM_CONSTANT(FORMAT_RGBA5551);
+ BIND_ENUM_CONSTANT(FORMAT_RF); //float
+ BIND_ENUM_CONSTANT(FORMAT_RGF);
+ BIND_ENUM_CONSTANT(FORMAT_RGBF);
+ BIND_ENUM_CONSTANT(FORMAT_RGBAF);
+ BIND_ENUM_CONSTANT(FORMAT_RH); //half float
+ BIND_ENUM_CONSTANT(FORMAT_RGH);
+ BIND_ENUM_CONSTANT(FORMAT_RGBH);
+ BIND_ENUM_CONSTANT(FORMAT_RGBAH);
+ BIND_ENUM_CONSTANT(FORMAT_RGBE9995);
+ BIND_ENUM_CONSTANT(FORMAT_DXT1); //s3tc bc1
+ BIND_ENUM_CONSTANT(FORMAT_DXT3); //bc2
+ BIND_ENUM_CONSTANT(FORMAT_DXT5); //bc3
+ BIND_ENUM_CONSTANT(FORMAT_RGTC_R);
+ BIND_ENUM_CONSTANT(FORMAT_RGTC_RG);
+ BIND_ENUM_CONSTANT(FORMAT_BPTC_RGBA); //btpc bc6h
+ BIND_ENUM_CONSTANT(FORMAT_BPTC_RGBF); //float /
+ BIND_ENUM_CONSTANT(FORMAT_BPTC_RGBFU); //unsigned float
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC2); //pvrtc
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC2A);
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC4);
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC4A);
+ BIND_ENUM_CONSTANT(FORMAT_ETC); //etc1
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_R11); //etc2
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_R11S); //signed ); NOT srgb.
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RG11);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RG11S);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RGB8);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RGBA8);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RGB8A1);
+ BIND_ENUM_CONSTANT(FORMAT_MAX);
+
+ BIND_ENUM_CONSTANT(INTERPOLATE_NEAREST);
+ BIND_ENUM_CONSTANT(INTERPOLATE_BILINEAR);
+ BIND_ENUM_CONSTANT(INTERPOLATE_CUBIC);
+
+ BIND_ENUM_CONSTANT(ALPHA_NONE);
+ BIND_ENUM_CONSTANT(ALPHA_BIT);
+ BIND_ENUM_CONSTANT(ALPHA_BLEND);
+
+ BIND_ENUM_CONSTANT(COMPRESS_S3TC);
+ BIND_ENUM_CONSTANT(COMPRESS_PVRTC2);
+ BIND_ENUM_CONSTANT(COMPRESS_PVRTC4);
+ BIND_ENUM_CONSTANT(COMPRESS_ETC);
+ BIND_ENUM_CONSTANT(COMPRESS_ETC2);
+
+ BIND_ENUM_CONSTANT(COMPRESS_SOURCE_GENERIC);
+ BIND_ENUM_CONSTANT(COMPRESS_SOURCE_SRGB);
+ BIND_ENUM_CONSTANT(COMPRESS_SOURCE_NORMAL);
}
void Image::set_compress_bc_func(void (*p_compress_func)(Image *, CompressSource)) {