- added minimal time profiling of texture precaching

This commit is contained in:
alexey.lysiuk 2019-12-20 11:06:00 +02:00
parent daedf9d158
commit a0670f5c5b

View file

@ -222,6 +222,10 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
if (gl_precache)
{
cycle_t precache;
precache.Reset();
precache.Clock();
FImageSource::BeginPrecaching();
// cache all used textures
@ -271,6 +275,9 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
Models[i]->BuildVertexBuffer(renderer);
}
delete renderer;
precache.Unclock();
Printf(DMSG_NOTIFY, "Textures precached in %.3f ms\n", precache.TimeMS());
}
delete[] spritehitlist;