Program\Engine_Updating\Engine\Source\Runtime\Launch\Private\Launch.cpp
while( !GIsRequestingExit )
{
EngineTick();
}
GEngine->Tick( FApp::GetDeltaTime(), bIdleMode );
void FRendererModule::BeginRenderingViewFamily(FCanvas* Canvas,FSceneViewFamily* ViewFamily)
{
UWorld* World = nullptr;
check(ViewFamily->Scene);
FScene* const Scene = ViewFamily->Scene->GetRenderScene();
if (Scene)
{
World = Scene->GetWorld();
if (World)
{
//guarantee that all render proxies are up to date before kicking off a BeginRenderViewFamily.
World->SendAllEndOfFrameUpdates();
}
}
// Flush the canvas first.
Canvas->Flush_GameThread();
// Increment FrameNumber before render the scene. Wrapping around is

本文介绍了在虚幻4引擎中,主线程如何在每个Tick时向渲染线程发送Task来执行每一帧的渲染工作。由于主线程控制Task的创建,当删除物品时,能确保在空任务执行完毕后,Task队列中不再有对已删除物品的引用,从而安全地删除UObject,避免渲染线程自我调度导致的问题。
271

被折叠的 条评论
为什么被折叠?



