iOS modular build and export implementation.

This commit is contained in:
bruvzg
2019-11-29 08:54:39 +02:00
parent 52e3993eb0
commit 2ef8c5fac5
38 changed files with 210 additions and 75 deletions

View File

@ -59,17 +59,36 @@ public:
FEED_IMAGES = 2
};
typedef CameraServer *(*CreateFunc)();
private:
protected:
static CreateFunc create_func;
Vector<Ref<CameraFeed> > feeds;
static CameraServer *singleton;
static void _bind_methods();
template <class T>
static CameraServer *_create_builtin() {
return memnew(T);
}
public:
static CameraServer *get_singleton();
template <class T>
static void make_default() {
create_func = _create_builtin<T>;
}
static CameraServer *create() {
CameraServer *server = create_func ? create_func() : memnew(CameraServer);
return server;
};
// Right now we identify our feed by it's ID when it's used in the background.
// May see if we can change this to purely relying on CameraFeed objects or by name.
int get_free_id();