DX8 Program won't run in DX9
I found one of my older programs that I wrote in DX8, when I compile and link it (In MSDV 6.0) I get zero errors and zero warnings, however when I execute the program it doesn't do anything, it doesn't show any error messages, it doesn't change the screen resolution. YOu can't tell that I am even trying to run a program
I tried debugging it, and it seems to jump out on the first line.
This is driving me crazy. I am probably missing something really simple. Can anybody help me?
P.S. The game I wrote in DX7 won't work either, but it at least runs enough to spit out the error that it can't initialize the graphics.
Quote:Original post by Sr_Guapo
Are you linking to the correct libraries?
I am linking to these, do I need to change anything?
d3dx8.lib d3d8.lib dxguid.lib dxerr8.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Quote:Original post by treeway
It's probably failing on the CreateDevice function.
Your right, by messing with a messagebox I manage to pinpoint the problem to here.
if(FAILED(d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &dev))){
Close();
return(FALSE);
}
Anybody have any idea how to fix this?
Catch the return value with an
HRESULT hr = d3d->CreateDevice(blah blah);
What do you get?
This is from the documentation on the return values of the specific method:
HRESULT hr = d3d->CreateDevice(blah blah);
What do you get?
This is from the documentation on the return values of the specific method:
Quote:
Return Value
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value.
D3DERR_NOTAVAILABLE This device does not support the queried technique.
D3DERR_OUTOFVIDEOMEMORY Direct3D does not have enough display memory to perform the operation.
How about the version the trow into the direct3dcreate8 function?
The version will most likly be 9 while the thing you are using is
8.
Tjaalie,
PS I don't know if this can give you an error. Just guessing the version
you pass there isn't for nothing.
The version will most likly be 9 while the thing you are using is
8.
Tjaalie,
PS I don't know if this can give you an error. Just guessing the version
you pass there isn't for nothing.
Quote:Original post by someusername
Catch the return value with an
HRESULT hr = d3d->CreateDevice(blah blah);
What do you get?
This is from the documentation on the return values of the specific method:Quote:
Return Value
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
Ok, I found out that it is getting the NOTAVAILABLE error. I am going to search how to fix it right now.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement