01-03-2022, 09:44 AM
I cannot reproduce this exception.
Are you running the sample in a virtual machine that does not support hardware accelerated DirectX 11?
If you want to support that case, then add try ... catch around the CreateDXSceneWithSwapChain call and in case when _dxDevice is null or in case of an exception set the dxDeviceConfiguration.DriverType to DriverType.Software and then create the DXDevice again and call the CreateDXSceneWithSwapChain method; but this will work much slower.
If there is some other reason for the exception, please provide more information about the exception (full call stack) and check the values of parameters (is any of them null?).
Are you running the sample in a virtual machine that does not support hardware accelerated DirectX 11?
If you want to support that case, then add try ... catch around the CreateDXSceneWithSwapChain call and in case when _dxDevice is null or in case of an exception set the dxDeviceConfiguration.DriverType to DriverType.Software and then create the DXDevice again and call the CreateDXSceneWithSwapChain method; but this will work much slower.
If there is some other reason for the exception, please provide more information about the exception (full call stack) and check the values of parameters (is any of them null?).
Andrej Benedik