MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / BakeThread

Function BakeThread

BakingLab/MeshBaker.cpp:675–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673
674// Entry point for a bake thread
675template<typename TBaker> uint32 __stdcall BakeThread(void* data)
676{
677 BakeThreadData* threadData = reinterpret_cast<BakeThreadData*>(data);
678 const MeshBaker* meshBaker = threadData->Baker;
679
680 BakeThreadContext context;
681 TBaker baker;
682
683 while(meshBaker->killBakeThreads == false)
684 {
685 const uint64 currTag = meshBaker->bakeTag;
686 if(context.BakeTag != currTag)
687 context.Init(threadData->BakeOutput, threadData->Samples,
688 threadData->CurrBatch, threadData->Baker, currTag);
689
690 if(BakeDriver<TBaker>(context, baker) == false)
691 Sleep(5);
692 }
693
694 return 0;
695}
696
697
698// Builds a BVH tree for an entire model/scene

Callers

nothing calls this directly

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected