MCPcopy Create free account
hub / github.com/assimp/assimp / AddTextureMem

Function AddTextureMem

tools/assimp_view/MessageProc.cpp:598–607  ·  view source on GitHub ↗

------------------------------------------------------------------------------- Get the amount of memory required for textures -------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

596// Get the amount of memory required for textures
597//-------------------------------------------------------------------------------
598void AddTextureMem(IDirect3DTexture9* pcTex, unsigned int& out) {
599 if (!pcTex) {
600 return;
601 }
602
603 D3DSURFACE_DESC sDesc;
604 pcTex->GetLevelDesc(0,&sDesc);
605
606 out += (sDesc.Width * sDesc.Height) << 2;
607}
608
609//-------------------------------------------------------------------------------
610// Display memory statistics

Callers 1

DisplayMemoryConsumptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected