This function code fail and following code try to use NULL pointer ?
D3D10CreateDeviceAndSwapChain( NULL,
D3D10_DRIVER_TYPE_HARDWARE,
NULL,
D3D10_CREATE_DEVICE_DEBUG ,
D3D10_SDK_VERSION,
&sd,
&g_pSwapChain,
&g_pd3dDevice );
Your older code was this ??
if (D3D10CreateDeviceAndSwapChain(NULL,
D3D10_DRIVER_TYPE_HARDWARE,
NULL, 0,
D3D10_SDK_VERSION,
&sd,
&g_pSwapChain,
&g_pd3dDevice)
)
if (D3D10CreateDeviceAndSwapChain(NULL,
D3D10_DRIVER_TYPE_REFERENCE,
NULL, 0,
D3D10_SDK_VERSION,
&sd, &g_pSwapChain, &g_pd3dDevice))
return 1;