summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r--scene/resources/texture.cpp65
1 files changed, 34 insertions, 31 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 9a251c029d..f542d2a8de 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -75,14 +75,14 @@ void Texture::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "normal_map", "clip_uv"), &Texture::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(true));
ClassDB::bind_method(D_METHOD("get_data"), &Texture::get_data);
- BIND_CONSTANT(FLAG_MIPMAPS);
- BIND_CONSTANT(FLAG_REPEAT);
- BIND_CONSTANT(FLAG_FILTER);
- BIND_CONSTANT(FLAG_VIDEO_SURFACE);
- BIND_CONSTANT(FLAGS_DEFAULT);
- BIND_CONSTANT(FLAG_ANISOTROPIC_FILTER);
- BIND_CONSTANT(FLAG_CONVERT_TO_LINEAR);
- BIND_CONSTANT(FLAG_MIRRORED_REPEAT);
+ BIND_ENUM_CONSTANT(FLAG_MIPMAPS);
+ BIND_ENUM_CONSTANT(FLAG_REPEAT);
+ BIND_ENUM_CONSTANT(FLAG_FILTER);
+ BIND_ENUM_CONSTANT(FLAG_VIDEO_SURFACE);
+ BIND_ENUM_CONSTANT(FLAGS_DEFAULT);
+ BIND_ENUM_CONSTANT(FLAG_ANISOTROPIC_FILTER);
+ BIND_ENUM_CONSTANT(FLAG_CONVERT_TO_LINEAR);
+ BIND_ENUM_CONSTANT(FLAG_MIRRORED_REPEAT);
}
Texture::Texture() {
@@ -362,9 +362,9 @@ void ImageTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_size_override", "size"), &ImageTexture::set_size_override);
ClassDB::bind_method(D_METHOD("_reload_hook", "rid"), &ImageTexture::_reload_hook);
- BIND_CONSTANT(STORAGE_RAW);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSY);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
+ BIND_ENUM_CONSTANT(STORAGE_RAW);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSY);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
}
ImageTexture::ImageTexture() {
@@ -1335,19 +1335,21 @@ void CubeMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lossy_storage_quality", "quality"), &CubeMap::set_lossy_storage_quality);
ClassDB::bind_method(D_METHOD("get_lossy_storage_quality"), &CubeMap::get_lossy_storage_quality);
- BIND_CONSTANT(STORAGE_RAW);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSY);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
- BIND_CONSTANT(SIDE_LEFT);
- BIND_CONSTANT(SIDE_RIGHT);
- BIND_CONSTANT(SIDE_BOTTOM);
- BIND_CONSTANT(SIDE_TOP);
- BIND_CONSTANT(SIDE_FRONT);
- BIND_CONSTANT(SIDE_BACK);
- BIND_CONSTANT(FLAG_MIPMAPS);
- BIND_CONSTANT(FLAG_REPEAT);
- BIND_CONSTANT(FLAG_FILTER);
- BIND_CONSTANT(FLAGS_DEFAULT);
+ BIND_ENUM_CONSTANT(STORAGE_RAW);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSY);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
+
+ BIND_ENUM_CONSTANT(SIDE_LEFT);
+ BIND_ENUM_CONSTANT(SIDE_RIGHT);
+ BIND_ENUM_CONSTANT(SIDE_BOTTOM);
+ BIND_ENUM_CONSTANT(SIDE_TOP);
+ BIND_ENUM_CONSTANT(SIDE_FRONT);
+ BIND_ENUM_CONSTANT(SIDE_BACK);
+
+ BIND_ENUM_CONSTANT(FLAG_MIPMAPS);
+ BIND_ENUM_CONSTANT(FLAG_REPEAT);
+ BIND_ENUM_CONSTANT(FLAG_FILTER);
+ BIND_ENUM_CONSTANT(FLAGS_DEFAULT);
}
CubeMap::CubeMap() {
@@ -1366,13 +1368,14 @@ CubeMap::~CubeMap() {
VisualServer::get_singleton()->free(cubemap);
}
-/* BIND_CONSTANT( FLAG_CUBEMAP );
- BIND_CONSTANT( CUBEMAP_LEFT );
- BIND_CONSTANT( CUBEMAP_RIGHT );
- BIND_CONSTANT( CUBEMAP_BOTTOM );
- BIND_CONSTANT( CUBEMAP_TOP );
- BIND_CONSTANT( CUBEMAP_FRONT );
- BIND_CONSTANT( CUBEMAP_BACK );
+/* BIND_ENUM(CubeMapSize);
+ BIND_ENUM_CONSTANT( FLAG_CUBEMAP );
+ BIND_ENUM_CONSTANT( CUBEMAP_LEFT );
+ BIND_ENUM_CONSTANT( CUBEMAP_RIGHT );
+ BIND_ENUM_CONSTANT( CUBEMAP_BOTTOM );
+ BIND_ENUM_CONSTANT( CUBEMAP_TOP );
+ BIND_ENUM_CONSTANT( CUBEMAP_FRONT );
+ BIND_ENUM_CONSTANT( CUBEMAP_BACK );
*/
///////////////////////////