Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
update engine (tasks without priorities)
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Jan 25, 2024
1 parent 96e86d3 commit cec4299
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion externals/libnavmesh
10 changes: 5 additions & 5 deletions sources/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ namespace unnatural
base = meshGenerateBaseNavigation();
if (configDebugSaveIntermediate)
meshSaveDebug(base, pathJoin(debugDirectory, "navMeshBase.glb"));
Holder<AsyncTask> tn = tasksRunAsync("navmesh", Delegate<void(uint32)>().bind<NavmeshProcessor, &NavmeshProcessor::taskNavmesh>(this), 1);
Holder<AsyncTask> tc = tasksRunAsync("collider", Delegate<void(uint32)>().bind<NavmeshProcessor, &NavmeshProcessor::taskCollider>(this), 1);
Holder<AsyncTask> tn = tasksRunAsync("navmesh", Delegate<void(uint32)>().bind<NavmeshProcessor, &NavmeshProcessor::taskNavmesh>(this));
Holder<AsyncTask> tc = tasksRunAsync("collider", Delegate<void(uint32)>().bind<NavmeshProcessor, &NavmeshProcessor::taskCollider>(this));
tn->wait();
tc->wait();
}

NavmeshProcessor() { taskRef = tasksRunAsync("navmesh", Delegate<void(uint32)>().bind<NavmeshProcessor, &NavmeshProcessor::processEntry>(this), 1, 30); }
NavmeshProcessor() { taskRef = tasksRunAsync("navmesh", Delegate<void(uint32)>().bind<NavmeshProcessor, &NavmeshProcessor::processEntry>(this)); }

void wait() { taskRef->wait(); }
};
Expand Down Expand Up @@ -173,7 +173,7 @@ namespace unnatural
tasksRunBlocking("land chunk", Delegate<void(uint32)>().bind<LandProcessor, &LandProcessor::chunkEntry>(this), numeric_cast<uint32>(split.size()));
}

LandProcessor() { taskRef = tasksRunAsync("land", Delegate<void(uint32)>().bind<LandProcessor, &LandProcessor::processEntry>(this), 1, 20); }
LandProcessor() { taskRef = tasksRunAsync("land", Delegate<void(uint32)>().bind<LandProcessor, &LandProcessor::processEntry>(this)); }

void wait() { taskRef->wait(); }
};
Expand Down Expand Up @@ -229,7 +229,7 @@ namespace unnatural
tasksRunBlocking("water chunk", Delegate<void(uint32)>().bind<WaterProcessor, &WaterProcessor::chunkEntry>(this), numeric_cast<uint32>(split.size()));
}

WaterProcessor() { taskRef = tasksRunAsync("water", Delegate<void(uint32)>().bind<WaterProcessor, &WaterProcessor::processEntry>(this), 1, 10); }
WaterProcessor() { taskRef = tasksRunAsync("water", Delegate<void(uint32)>().bind<WaterProcessor, &WaterProcessor::processEntry>(this)); }

void wait() { taskRef->wait(); }
};
Expand Down

0 comments on commit cec4299

Please sign in to comment.