Files
asarium 016c07dc3a Add feature to execute Lua coroutines at specific points
This adds a mechanism for running generic operations at specific points
of the frame execution. This can be used by any part of the code an not
just Lua since it simply executes std::functions. It also adds an
"execution context" concept that specifies in which situation an
operation should be executed.

This is then used by the Lua Coroutines code for resuming coroutines at
specific points instead of always when the awaited promise resolves.
2020-06-06 21:29:48 +02:00

19 lines
381 B
C++

#pragma once
#include "Executor.h"
namespace executor
{
/**
* @brief Executor that will be called at the end of every simulation frame.
*/
extern const std::shared_ptr<Executor> OnSimulationExecutor;
/**
* @brief Executor that will be called just before the game triggers the presentation of the current frame.
*/
extern const std::shared_ptr<Executor> OnFrameExecutor;
}