45 #define K_SYSTEM_TYPE_MAX_COUNT 512
This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:177
_Bool b8
8-bit boolean type
Definition: defines.h:58
unsigned short u16
Unsigned 16-bit integer.
Definition: defines.h:22
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
This file contains the linear allocator implementation.
Represents configuration for the application. The application config is fed to the engine on creation...
Definition: engine.h:29
Engine-level current frame-specific data.
Definition: frame_data.h:16
Represents a registered system. Function pointers for init, shutdown and (optionally) update are held...
Definition: systems_manager.h:32
PFN_system_update update
A function pointer for the system's update routine, called every frame. Optional.
Definition: systems_manager.h:42
PFN_system_initialize initialize
A function pointer for the initialization routine. Required.
Definition: systems_manager.h:38
void * state
The state for the system.
Definition: systems_manager.h:36
PFN_system_shutdown shutdown
A function pointer for the shutdown routine. Required.
Definition: systems_manager.h:40
u64 state_size
The size of the state for the system.
Definition: systems_manager.h:34
The data structure for a linear allocator.
Definition: linear_allocator.h:25
The state for the systems manager. Holds the allocator used for all systems as well as the instances ...
Definition: systems_manager.h:88
k_system systems[K_SYSTEM_TYPE_MAX_COUNT]
The registered systems array.
Definition: systems_manager.h:92
linear_allocator systems_allocator
The allocator used to obtain state memory for registered systems.
Definition: systems_manager.h:90
b8(* PFN_system_update)(void *state, struct frame_data *p_frame_data)
Typedef for a update function pointer.
Definition: systems_manager.h:25
b8 systems_manager_post_boot_initialize(systems_manager_state *state, struct application_config *app_config)
Initializes the system manager for all systems which must be setup after the application boot sequenc...
b8 systems_manager_update(systems_manager_state *state, struct frame_data *p_frame_data)
Calls update routines on all systems that opt in to the update. Performed during the main engine loop...
struct systems_manager_state systems_manager_state
The state for the systems manager. Holds the allocator used for all systems as well as the instances ...
struct k_system k_system
Represents a registered system. Function pointers for init, shutdown and (optionally) update are held...
void systems_manager_shutdown(systems_manager_state *state)
Shuts the systems manager down.
b8(* PFN_system_initialize)(u64 *memory_requirement, void *memory, void *config)
Typedef for a system initialize function pointer.
Definition: systems_manager.h:21
k_system_type
Represents the known system types within the engine core up to K_SYSTEM_TYPE_KNOWN_MAX....
Definition: systems_manager.h:53
@ K_SYSTEM_TYPE_GEOMETRY
Definition: systems_manager.h:70
@ K_SYSTEM_TYPE_PLATFORM
Definition: systems_manager.h:60
@ K_SYSTEM_TYPE_MATERIAL
Definition: systems_manager.h:69
@ K_SYSTEM_TYPE_TEXTURE
Definition: systems_manager.h:64
@ K_SYSTEM_TYPE_RENDER_VIEW
Definition: systems_manager.h:68
@ K_SYSTEM_TYPE_RENDERER
Definition: systems_manager.h:67
@ K_SYSTEM_TYPE_LIGHT
Definition: systems_manager.h:71
@ K_SYSTEM_TYPE_EVENT
Definition: systems_manager.h:57
@ K_SYSTEM_TYPE_RESOURCE
Definition: systems_manager.h:61
@ K_SYSTEM_TYPE_INPUT
Definition: systems_manager.h:59
@ K_SYSTEM_TYPE_KNOWN_MAX
Definition: systems_manager.h:75
@ K_SYSTEM_TYPE_LOGGING
Definition: systems_manager.h:58
@ K_SYSTEM_TYPE_JOB
Definition: systems_manager.h:63
@ K_SYSTEM_TYPE_MEMORY
Definition: systems_manager.h:54
@ K_SYSTEM_TYPE_KVAR
Definition: systems_manager.h:56
@ K_SYSTEM_TYPE_CONSOLE
Definition: systems_manager.h:55
@ K_SYSTEM_TYPE_AUDIO
Definition: systems_manager.h:72
@ K_SYSTEM_TYPE_FONT
Definition: systems_manager.h:65
@ K_SYSTEM_TYPE_USER_MAX
Definition: systems_manager.h:78
@ K_SYSTEM_TYPE_CAMERA
Definition: systems_manager.h:66
@ K_SYSTEM_TYPE_MAX
Definition: systems_manager.h:80
@ K_SYSTEM_TYPE_SHADER
Definition: systems_manager.h:62
void(* PFN_system_shutdown)(void *state)
Typedef for a system shutdown function pointer.
Definition: systems_manager.h:23
b8 systems_manager_initialize(systems_manager_state *state, struct application_config *app_config)
Initializes the system manager for all systems which must be setup before the application boot sequen...
KAPI b8 systems_manager_register(systems_manager_state *state, u16 type, PFN_system_initialize initialize, PFN_system_shutdown shutdown, PFN_system_update update, void *config)
Registers a system to be managed.
KAPI void * systems_manager_get_state(u16 type)
#define K_SYSTEM_TYPE_MAX_COUNT
Definition: systems_manager.h:45