Greetings,
I looked at earlier posts on the issue, and tried using DirectX to query available video memory.
These are the numbers I get:
For my 256MB GeForce 6800:
GetAvailableVidMem: total = 256901120 free = 256852992
AvailableTextureMem = 448790528
That seems OK.
But, for my 128MB ATI FireGL3100 card:
GetAvailableVidMem: total =
654180320 free = 654180320
GetAvailableTextureMem(): 654311424
That’s around 624 MB!
I am only interested in knowing whether the card is a 64/128/256 model. I don’t care how much is available for use etc.
thanks,
Maniam
My code:
LPDIRECTDRAW lpdd = NULL;
LPDIRECTDRAW7 lpdd7 = NULL;
DDSCAPS2 ddsCaps2;
DWORD dwTotal;
DWORD dwFree;
HRESULT hr;
ZeroMemory(&ddsCaps2, sizeof(ddsCaps2));
ddsCaps2.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = lpdd7->GetAvailableVidMem(&ddsCaps2, &dwTotal, &dwFree);
g_pD3D = Direct3DCreate9(D3D_SDK_VERSION);
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &g_pd3dDevice ) ) )
{
return E_FAIL;
}
DDSCAPS2 ddsVidMemcaps;
ZeroMemory(&ddsVidMemcaps, sizeof(DDSCAPS2));
ddsVidMemcaps.dwCaps = DDSCAPS_VIDEOMEMORY;
int AvailableTextureMem = g_pd3dDevice->GetAvailableTextureMem();