MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Init

Method Init

Source/Engine/ShadowsOfMordor/Builder.BuildCache.cpp:20–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20bool ShadowsOfMordor::Builder::LightmapBuildCache::Init(const LightmapSettings* settings)
21{
22 if (LightmapData)
23 return false;
24 LightmapData = GPUDevice::Instance->CreateBuffer(TEXT("LightmapBuildCache"));
25 const auto elementsCount = (int32)settings->AtlasSize * (int32)settings->AtlasSize * NUM_SH_TARGETS;
26 if (LightmapData->Init(GPUBufferDescription::Typed(elementsCount, HemispheresFormatToPixelFormat[HEMISPHERES_IRRADIANCE_FORMAT], true)))
27 return true;
28 return false;
29}
30
31ShadowsOfMordor::Builder::SceneBuildCache::SceneBuildCache()
32 : Scene(nullptr)

Callers 5

doWorkMethod · 0.45
loadStateMethod · 0.45
initResourcesMethod · 0.45
AtlasChartsPackerMethod · 0.45
updateLightmapsMethod · 0.45

Calls 2

CreateBufferMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected