Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

how much dedicated memory the PC GPU has

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   

491
Like
0Likes
Like

Posted 22 April 2013 - 10:06 PM

Is there any code that lets me see how much memory the PC has?

My application changes radically the more memory it can has.


Edited by lomateron, 23 April 2013 - 12:15 AM.


#2 Yourself   Members   

1933
Like
2Likes
Like

Posted 23 April 2013 - 12:59 AM

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;
	}
}

 

 






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.