LDKBuiltinSystemId
IDs of builtin systems.
typedef enum LDKBuiltinSystemId{
LDK_SYSTEM_ID_SCENEGRAPH=0x1,
LDK_SYSTEM_ID_USER=0x100
}LDKBuiltinSystemId;
IDs of builtin systems.
typedef enum LDKBuiltinSystemId{
LDK_SYSTEM_ID_SCENEGRAPH=0x1,
LDK_SYSTEM_ID_USER=0x100
}LDKBuiltinSystemId;
typedef struct LDKSystemDesc{
u64 id;
const char *name;
u32 flags;
LDKSystemBucket bucket;
i32 order;
u32 data_size;
LDKSystemInitializeFn initialize;
LDKSystemUpdateFn update;
LDKSystemTerminateFn terminate;
const u32 *component_types;
u32 component_count;
}LDKSystemDesc;
typedef enum LDKSystemFlags{
LDK_SYSTEM_FLAG_NONE=0,
LDK_SYSTEM_FLAG_ENABLED=1<<0,
LDK_SYSTEM_FLAG_ENGINE_NATIVE=1<<1,
LDK_SYSTEM_FLAG_RUN_WHEN_PAUSED=1<<2
}LDKSystemFlags;
typedef struct LDKSystemRegistry{
void *internal;
struct LDKRoot *root;
u8 is_initialized;
u8 is_started;
u8 is_paused;
}LDKSystemRegistry;
Descriptors for systems implemented by the engine. Games own registration.
LDK_API u32 ldk_engine_system_descriptor_count(void);
Number of matching entries.
Get the engine system descriptor.
LDK_API bool ldk_engine_system_descriptor_get(
u32 index,
LDKSystemDesc *out
);
u32 indexLDKSystemDesc *outTrue if the operation succeeds; false otherwise.
Get a system registered at a particular index.
LDK_API bool ldk_system_registry_at(
const LDKSystemRegistry *registry,
u32 index,
LDKSystemDesc *out
);
const LDKSystemRegistry *registryu32 indexLDKSystemDesc *outTrue if the operation succeeds; false otherwise.
Clear the state of the system registry.
LDK_API bool ldk_system_registry_clear(LDKSystemRegistry *registry);
LDKSystemRegistry *registryTrue if the operation succeeds; false otherwise.
Count registered systems.
LDK_API u32 ldk_system_registry_count(const LDKSystemRegistry *registry);
const LDKSystemRegistry *registryNumber of matching entries.
Find a registered system by its stable ID.
LDK_API bool ldk_system_registry_find_by_id(
LDKSystemRegistry *registry,
u64 id,
LDKSystemDesc *out
);
LDKSystemRegistry *registryu64 idLDKSystemDesc *outTrue if the operation succeeds; false otherwise.
Check whether a system ID is registered.
LDK_API bool ldk_system_registry_has(
const LDKSystemRegistry *registry,
u64 id
);
const LDKSystemRegistry *registryu64 idTrue when the queried condition holds; false otherwise.
Initialize the system registry.
LDK_API bool ldk_system_registry_initialize(LDKSystemRegistry *registry);
LDKSystemRegistry *registryTrue if the operation succeeds; false otherwise.
True while a bucket or a system lifecycle callback is executing.
LDK_API bool ldk_system_registry_is_busy(const LDKSystemRegistry *registry);
const LDKSystemRegistry *registryTrue when the queried condition holds; false otherwise.
Register the system registry.
LDK_API bool ldk_system_registry_register(
LDKSystemRegistry *registry,
const LDKSystemDesc *desc
);
LDKSystemRegistry *registryconst LDKSystemDesc *descTrue if the operation succeeds; false otherwise.
Shut down the system registry.
LDK_API void ldk_system_registry_terminate(LDKSystemRegistry *registry);
LDKSystemRegistry *registryUnregister the system registry.
LDK_API bool ldk_system_registry_unregister(
LDKSystemRegistry *registry,
u64 id
);
LDKSystemRegistry *registryu64 idTrue if the operation succeeds; false otherwise.