MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Preload

Method Preload

engine/PoseidonGL33/TextureBankGL33_Cache.cpp:330–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 int o2 = b2->GetFileOrder(n2 + strlen(b2->GetPrefix()));
329 return o1 - o2;
330}
331
332void TextBankGL33::Preload()
333{
334 Compact();
335
336 DWORD start = Foundation::GlobalTickCount();
337 QSort(_texture.Data(), _texture.Size(), CompareTextureFileOrderGL33);
338
339 for (int i = 0; i < _texture.Size(); i++)
340 {
341 TextureGL33* tex = _texture[i];
342 if (!tex)
343 continue;
344 tex->LoadHeadersNV();
345 ProgressRefresh();
346 }
347 DWORD end = Foundation::GlobalTickCount();
348
349 LOG_DEBUG(Graphics, "GL33: Preload {} textures - {} ms", _texture.Size(), end - start);
350}
351

Callers

nothing calls this directly

Calls 5

GlobalTickCountFunction · 0.85
QSortFunction · 0.85
ProgressRefreshFunction · 0.85
DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected