Is there any code that lets me see how much memory the PC has?
My application changes radically the more memory it can has.
Is there any code that lets me see how much memory the PC has?
My application changes radically the more memory it can has.
you can query the amount of GPU memory using DXGI.
something like this :
IDXGIFactory *factory;
uint32 index = 0:
if( SUCCEEDED(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory)) )
{
IDXGIAdapter* adapter = NULL;
while (factory->EnumAdapters(index, &adapter) != DXGI_ERROR_NOT_FOUND)
{
DXGI_ADAPTER_DESC desc;
if (SUCCEEDED(adapter->GetDesc(&desc)))
{
std::cout << desc.DedicatedVideoMemory << std::endl;
}
++index;
}
}