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); |
Partager