34#if !defined(FLECS_OS_API_IMPL) && !defined(FLECS_NO_OS_API_IMPL)
35#define FLECS_OS_API_IMPL
38#ifndef FLECS_PIPELINE_H
39#define FLECS_PIPELINE_H
54#define ECS_PIPELINE_DEFINE(world, id_, ...) \
56 ecs_pipeline_desc_t desc = {0}; \
57 ecs_entity_desc_t edesc = {0}; \
60 desc.entity = ecs_entity_init(world, &edesc);\
61 desc.query.expr = #__VA_ARGS__; \
62 id_ = ecs_pipeline_init(world, &desc); \
65 ecs_assert(id_ != 0, ECS_INVALID_PARAMETER, "failed to create pipeline");
74#define ECS_PIPELINE(world, id, ...) \
75 ecs_entity_t id = 0, ecs_id(id) = 0; ECS_PIPELINE_DEFINE(world, id, __VA_ARGS__);\
82#define ecs_pipeline(world, ...)\
83 ecs_pipeline_init(world, &(ecs_pipeline_desc_t) __VA_ARGS__ )
255 int32_t task_threads);
FLECS_API void ecs_set_threads(ecs_world_t *world, int32_t threads)
Set number of worker threads.
FLECS_API void ecs_set_time_scale(ecs_world_t *world, ecs_ftime_t scale)
Set time scale.
FLECS_API void ecs_set_pipeline(ecs_world_t *world, ecs_entity_t pipeline)
Set a custom pipeline.
FLECS_API ecs_entity_t ecs_get_pipeline(const ecs_world_t *world)
Get the current pipeline.
FLECS_API bool ecs_progress(ecs_world_t *world, ecs_ftime_t delta_time)
Progress a world.
FLECS_API void ecs_reset_clock(ecs_world_t *world)
Reset world clock.
FLECS_API void ecs_run_pipeline(ecs_world_t *world, ecs_entity_t pipeline, ecs_ftime_t delta_time)
Run pipeline.
struct ecs_pipeline_desc_t ecs_pipeline_desc_t
Pipeline descriptor, used with ecs_pipeline_init().
FLECS_API bool ecs_using_task_threads(ecs_world_t *world)
Returns true if task thread use have been requested.
FLECS_API void ecs_set_task_threads(ecs_world_t *world, int32_t task_threads)
Set number of worker task threads.
FLECS_API void FlecsPipelineImport(ecs_world_t *world)
Pipeline module import function.
FLECS_API ecs_entity_t ecs_pipeline_init(ecs_world_t *world, const ecs_pipeline_desc_t *desc)
Create a custom pipeline.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
#define ecs_ftime_t
Customizable precision for scalar time values.
Pipeline descriptor, used with ecs_pipeline_init().
ecs_entity_t entity
Existing entity to associate with pipeline (optional).
ecs_query_desc_t query
The pipeline query.
Used with ecs_query_init().