88 if (!flecs_poly_release(world_)) {
int(* ecs_app_init_action_t)(ecs_world_t *world)
Callback type for init action.
FLECS_API int ecs_app_run(ecs_world_t *world, ecs_app_desc_t *desc)
Run application.
ecs_world_t world_t
World type.
#define ecs_ftime_t
Customizable precision for scalar time values.
int ecs_fini(ecs_world_t *world)
Delete a world.
bool ecs_should_quit(const ecs_world_t *world)
Return whether a quit has been requested.
const ecs_world_info_t * ecs_get_world_info(const ecs_world_t *world)
Get the world info.
uint16_t port
HTTP port used by REST API.
bool enable_stats
Periodically collects statistics.
ecs_ftime_t target_fps
Target FPS.
ecs_ftime_t delta_time
Frame time increment (0 for measured values).
ecs_app_init_action_t init
If set, the function is run before starting the main loop.
int32_t frames
Number of frames to run (0 for infinite).
void * ctx
Reserved for custom run and frame actions.
bool enable_rest
Enables ECS access over HTTP, necessary for the explorer.
int32_t threads
Number of threads.
Type that contains information about the world.
app_builder & frames(int32_t value)
Set the number of frames to run.
app_builder & init(ecs_app_init_action_t value)
Set the init callback.
int run()
Run the application.
app_builder & enable_stats(bool value=true)
Enable statistics collection.
app_builder & threads(int32_t value)
Set the number of threads.
app_builder & enable_rest(uint16_t port=0)
Enable the REST API.
app_builder & delta_time(ecs_ftime_t value)
Set the fixed delta time for each frame.
app_builder & target_fps(ecs_ftime_t value)
Set the target frames per second.
app_builder & ctx(void *value)
Set the application context.