Quote
Code: -2005530516
Message: Error in the application.
String: D3DERR_INVALIDCALL
Message: Error in the application.
String: D3DERR_INVALIDCALL
If deviceCaps.DeviceCaps.SupportsHardwareTransformAndLight Then newFlags = CreateFlags.HardwareVertexProcessing Else newFlags = CreateFlags.SoftwareVertexProcessing End If If deviceCaps.DeviceCaps.SupportsPureDevice And newFlags = CreateFlags.HardwareVertexProcessing Then newFlags &= CreateFlags.PureDevice End If Dim presentParams As New PresentParameters presentParams.SwapEffect = SwapEffect.Discard presentParams.Windowed = True d3dDevice = New Device(defaultAdapter, DeviceType.Hardware, ContagionForm.Handle.ToInt32, newFlags, presentParams)All of my variables have been defined:
Dim d3dDevice As Device Dim defaultAdapter As Integer = Manager.Adapters.Default.Adapter Dim deviceCaps As Caps = Manager.GetDeviceCaps(defaultAdapter, DeviceType.Hardware) Dim newFlags As CreateFlagsSo what is the problem? I can't believe DirectX doesn't give any more detail than "Error in the application"! Any ideas?
BTW, I did search the forums (using the error code as the string) before I posted, but the only topic I found that seemed to be relevant went off topic into a discussion about a college professor and never provided a clear answer to the problem.












