Original Post
I''m getting a bad return value from IDirect3D8::CreateDevice. It is not D3D_OK. I''m trying to start with a full screen program but all the examples Microsoft provides in the SDK are windowed, unfortunally nothing runs at a reasonable speed when windowed on my computer.
The following is a bit if proof of microsoft documentation quality and the code to show what error code I''m getting (not sure which)
According to the documentation with the dx8.1SDK there are 4 possible return values:
D3DERR_INVALIDCALL
D3DERR_NOTAVAILABLE
D3DERR_OUTOFVIDEOMEMORY
D3D_OK
Here is my code that I quickly whipped up trying to figure out what was going on:
DWORD RetValue = g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &D3DPP, &g_pD3DDevice);
if(D3D_OK != RetValue)
{
if(D3DERR_INVALIDCALL == RetValue)
MessageBox(g_hWnd, "D3DERR_INVALIDCALL", "CreateDevice Return value", MB_OK);
else if(D3DERR_NOTAVAILABLE == RetValue)
MessageBox(g_hWnd, "D3DERR_NOTAVAILABLE", "CreateDevice Return value", MB_OK);
else if(D3DERR_OUTOFVIDEOMEMORY == RetValue)
MessageBox(g_hWnd, "D3DERR_OUTOFVIDEOMEMORY ", "CreateDevice Return value", MB_OK);
else
MessageBox(g_hWnd, "Other ERROR, MICROSOFT DOCUMENTATION INCORRECT", "CreateDevice Return value", MB_OK);
return RET_INITD3D_CREATEDEVICEFAIL;
}
else
MessageBox(g_hWnd, "D3D_OK!", "CreateDevice Return value", MB_OK);
So whatever happens a message box MUST popup..... the bad part is its the "Other ERROR, MICROSOFT DOCUMENTATION INCORRECT" one. Which means there is at least a 4th possible return value for IDirect3D8::CreateDevice. I''m stuck. And I don''t know what I can do to fix the problem.
Thanks for any help,
Patrick