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

Method ReleaseMemory

engine/PoseidonGL33/TextureGL33_Loading.cpp:292–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290 InitDesc(desc, levelMin, false);
291
292 bank->UseReleased(_smallSurface, desc, format);
293
294 int totalSize = TotalSize(levelMin);
295
296 if (!_smallSurface.GetTexture())
297 {
298 bank->ReserveMemory(totalSize);
299
300 if (bank->CreateGPUSurface(_smallSurface, desc, format, totalSize) < 0)
301 return -1;
302 }
303
304 int ret = UploadToGPU(_smallSurface, levelMin);
305 if (ret >= 0)
306 {
307 _smallLoaded = levelMin;
308 return 0;
309 }
310 return -1;
311}
312

Callers 3

LoadInterpolatedMethod · 0.80
ReserveMemoryMethod · 0.80
ForceReloadAllMethod · 0.80

Calls 5

AddReleasedMethod · 0.80
SizeUsedMethod · 0.80
TextBankMethod · 0.45
GetTextureMethod · 0.45
FreeMethod · 0.45

Tested by

no test coverage detected