summaryrefslogtreecommitdiff
path: root/core/io/image_loader.h
diff options
context:
space:
mode:
authorFabian <supagu@gmail.com>2018-09-03 14:06:35 +0930
committerFabian <supagu@gmail.com>2018-11-23 08:16:54 +1030
commita01608c389eb0fefdffd85ab8075cd95dbf901be (patch)
tree5269fae6d747b074d0656387743452b2b17f2360 /core/io/image_loader.h
parent9efc6d85d86dcb469b458dabe382e641f67ea729 (diff)
Improved support for custom image loaders
Diffstat (limited to 'core/io/image_loader.h')
-rw-r--r--core/io/image_loader.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/io/image_loader.h b/core/io/image_loader.h
index d95a483c0d..7a58d46f93 100644
--- a/core/io/image_loader.h
+++ b/core/io/image_loader.h
@@ -70,20 +70,21 @@ public:
class ImageLoader {
- enum {
- MAX_LOADERS = 32
- };
+ static Vector<ImageFormatLoader *> loader;
friend class ResourceFormatLoaderImage;
- static ImageFormatLoader *loader[MAX_LOADERS];
- static int loader_count;
protected:
public:
static Error load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom = NULL, bool p_force_linear = false, float p_scale = 1.0);
static void get_recognized_extensions(List<String> *p_extensions);
- static bool recognize(const String &p_extension);
+ static ImageFormatLoader *recognize(const String &p_extension);
static void add_image_format_loader(ImageFormatLoader *p_loader);
+ static void remove_image_format_loader(ImageFormatLoader *p_loader);
+
+ static const Vector<ImageFormatLoader *> &get_image_format_loaders();
+
+ static void cleanup();
};
class ResourceFormatLoaderImage : public ResourceFormatLoader {