Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add world::run_pipeline<T>(ecs_ftime_t) overload #1002

Merged
merged 1 commit into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20134,6 +20134,13 @@ bool progress(ecs_ftime_t delta_time = 0.0) const;
*/
void run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_time = 0.0) const;

/** Run pipeline.
* @tparam Pipeline Type associated with pipeline.
* @see ecs_run_pipeline
*/
template <typename Pipeline, if_not_t< is_enum<Pipeline>::value > = 0>
void run_pipeline(ecs_ftime_t delta_time = 0.0) const;

/** Set timescale.
* @see ecs_set_time_scale
*/
Expand Down Expand Up @@ -28365,6 +28372,11 @@ inline void world::run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_tim
return ecs_run_pipeline(m_world, pip, delta_time);
}

template <typename Pipeline, if_not_t< is_enum<Pipeline>::value >>
inline void world::run_pipeline(ecs_ftime_t delta_time) const {
return ecs_run_pipeline(m_world, _::cpp_type<Pipeline>::id(m_world), delta_time);
}

inline void world::set_time_scale(ecs_ftime_t mul) const {
ecs_set_time_scale(m_world, mul);
}
Expand Down
5 changes: 5 additions & 0 deletions include/flecs/addons/cpp/mixins/pipeline/impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ inline void world::run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_tim
return ecs_run_pipeline(m_world, pip, delta_time);
}

template <typename Pipeline, if_not_t< is_enum<Pipeline>::value >>
inline void world::run_pipeline(ecs_ftime_t delta_time) const {
return ecs_run_pipeline(m_world, _::cpp_type<Pipeline>::id(m_world), delta_time);
}

inline void world::set_time_scale(ecs_ftime_t mul) const {
ecs_set_time_scale(m_world, mul);
}
Expand Down
7 changes: 7 additions & 0 deletions include/flecs/addons/cpp/mixins/pipeline/mixin.inl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ bool progress(ecs_ftime_t delta_time = 0.0) const;
*/
void run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_time = 0.0) const;

/** Run pipeline.
* @tparam Pipeline Type associated with pipeline.
* @see ecs_run_pipeline
*/
template <typename Pipeline, if_not_t< is_enum<Pipeline>::value > = 0>
void run_pipeline(ecs_ftime_t delta_time = 0.0) const;

/** Set timescale.
* @see ecs_set_time_scale
*/
Expand Down