Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
ecs_pipeline_desc_t Struct Reference

Pipeline descriptor, used with ecs_pipeline_init(). More...

#include <pipeline.h>

Public Attributes

ecs_entity_t entity
 Existing entity to associate with pipeline (optional).
 
ecs_query_desc_t query
 The pipeline query.
 

Detailed Description

Pipeline descriptor, used with ecs_pipeline_init().

Definition at line 88 of file pipeline.h.

Member Data Documentation

◆ entity

ecs_entity_t ecs_pipeline_desc_t::entity

Existing entity to associate with pipeline (optional).

Definition at line 90 of file pipeline.h.

◆ query

ecs_query_desc_t ecs_pipeline_desc_t::query

The pipeline query.

Pipelines are queries that are matched with system entities. Pipeline queries are the same as regular queries, which means the same query rules apply. A common mistake is to try a pipeline that matches systems in a list of phases by specifying all the phases, like: OnUpdate, OnPhysics, OnRender

That however creates a query that matches entities with OnUpdate and OnPhysics and OnRender tags, which is likely undesired. Instead, a query could use the or operator match a system that has one of the specified phases: OnUpdate || OnPhysics || OnRender

This will return the correct set of systems, but they likely won't be in the correct order. To make sure systems are returned in the correct order two query ordering features can be used:

  • group_by
  • order_by

Take a look at the system manual for a more detailed explanation of how query features can be applied to pipelines, and how the builtin pipeline query works.

Definition at line 115 of file pipeline.h.


The documentation for this struct was generated from the following file: