1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| IDirect3D9* pD3D = Direct3DCreate9(D3D_SDK_VERSION);
D3DDISPLAYMODE theMode;
D3DDEVTYPE devicetype;
D3DFORMAT Format = D3DFMT_R5G6B5; // 16 Bits
// Pour detecter les carte graphique
UINT iAmountDevices = pD3D->GetAdapterCount();
D3DADAPTER_IDENTIFIER9* psAdapterIdentifier=new(D3DADAPTER_IDENTIFIER9[iAmountDevices]);
for( UINT n = 0; n < iAmountDevices; n++ )
{
pD3D->GetAdapterIdentifier( n, 0, &psAdapterIdentifier[n] );
// boucles les differents Mode
UINT nCount = pD3D->GetAdapterModeCount( n, Format );
for( UINT j = 0; j < nCount; ++j )
{
// Test le Format
if( SUCCEEDED( pD3D->EnumAdapterModes( n, Format, j, &theMode) ) )
{
// Test l'acceleration 3D HAL
if( SUCCEEDED( pD3D->CheckDeviceType( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Format, Format, true ) ) )
{
graphique->addItem( "Direct3D T&L HAL" );
}
// Test l'acceleration 3D REF
if( SUCCEEDED( pD3D->CheckDeviceType( D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, Format, Format, true ) ) )
{
graphique->addItem( "Direct3D HAL" );
}
}
}
} |
Partager