Multithreading
Overview
In Effekseer, "Effekseer::Manager::Update" only can be executed in other thread. While updating effects, you can create effects, move effects, and so on.
Flip
The sample is "RuntimeSample/Multithread.sln"
Flip must be done manually in order to support multi-threading. I set false to autoFlip of "::Effekseer::Manager::Create" argument. Flip is done manually.
You need to execute "Effekseer::Manager::Flip" before "Effekseer::Manager::Update". Effects existing at the time of executing this function are subject to updating and drawing. After that, you can run "Effekseer::Manager::Update" in other thread.
// Create an instance of effect manager (flip is not done automatically)
g_manager = ::Effekseer::Manager::Create( 2000, false );
// Flip manager
g_manager->Flip();
// Start executing "Effekseer::Manager::Update" in other thread
// Create effects, move effects and so on.
// Wait to finish "Effekseer::Manager::Update"
// Render effects