Bonjour à tous.

J'ai repris tel quel le code du premier tuto de DX9 (CreateDevice) qui est censé afficher une simple fenêtre sur fond bleu.
Le problème c'est que la fonction CreateDevice me retourne l'erreur suivante:
erreur: D3DERR_NOTAVAILABLE. This device does not support the queried technique.
Voici le bout de code correspondant:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
D3DPRESENT_PARAMETERS d3dpp; 
    ZeroMemory( &d3dpp, sizeof(d3dpp) );
    d3dpp.Windowed = TRUE;
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
 
int e =  g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
                                      &d3dpp, &g_pd3dDevice 
 
if(e==D3DERR_INVALIDCALL)
          MessageBox(hWnd, "The method call is invalid. For example, a method's parameter may have an invalid value.", "Erreur: D3DERR_INVALIDCALL", 0);
else if(e==D3DERR_NOTAVAILABLE)
          MessageBox(hWnd, "This device does not support the queried technique.", "Erreur: D3DERR_NOTAVAILABLE", 0);
 
else if(e==D3DERR_OUTOFVIDEOMEMORY)
          MessageBox(hWnd, "Direct3D does not have enough display memory to perform the operation.", "Erreur: D3DERR_OUTOFVIDEOMEMORY", 0);
Merci beaucoup si vous pouvez m'aider. :o


[Balises CODE rajoutées par Loulou24, merci d'y penser à l'avenir]