HRESULT hr = CreateDeviceAndSwapChain
the debugger will show the define if you are using studio 2005+ otherwise check the value against the returns defined in the directx reference for that function.
First Time using DirectX 10
Well... I alredy know about the HRESULT HR = (function here) thing... but how do I actually check after that? I mean what do I do with the retrieved value?
If you are using visual studio then put a breakpoint on the line after your call to D3D10CreateDeviceAndSwapChain. Then press the green arrow at the top to run it in debug mode. When it hits that line, place your mouse over the variable name (hr) and see what its value is.
Well I got an DXGI_ERROR_UNSUPPORTED... here's the code I used:
HRESULT HR = D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, NULL, D3D10_SDK_VERSION, &SC_Desc, &SwapChain, &D3D);
MessageBox(NULL, DXGetErrorString(HR), NULL, NULL);
Any ideas on what that error code means?
HRESULT HR = D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, NULL, D3D10_SDK_VERSION, &SC_Desc, &SwapChain, &D3D);
MessageBox(NULL, DXGetErrorString(HR), NULL, NULL);
Any ideas on what that error code means?
try calling just D3D10CreateDevice if that fails your card doesn't support D3D10 or the driver doesn't. If it succeeds then try different surface settings till it works as the desc as set contains something your card doesn't like.
I got the same error for both functions for some reason :S...
Alright I just went through the SDK's DirectX 10 sample programs and found that only the "EmptyProject10" file loads without asking me if I want to use a reference device... but it moved around really slowly when I dragged it which leads me to believe that it may have automatically decided to load a reference deice for me.
Alright I just went through the SDK's DirectX 10 sample programs and found that only the "EmptyProject10" file loads without asking me if I want to use a reference device... but it moved around really slowly when I dragged it which leads me to believe that it may have automatically decided to load a reference deice for me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement