------------------------------------------------------------------------------- Get the amount of memory required for textures -------------------------------------------------------------------------------
| 596 | // Get the amount of memory required for textures |
| 597 | //------------------------------------------------------------------------------- |
| 598 | void 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 |
no outgoing calls
no test coverage detected