I'm trying to convert some code which was based on DX9 under .NET1.1 to DX9, .NET4 and SlimDX.
The old code had a number of event handlers set up:
graphics.DeviceLost += new EventHandler( this.InvalidateDeviceObjects );
graphics.DeviceReset += new EventHandler( this.RestoreDeviceObjects );
graphics.Disposing += new EventHandler( this.DeleteDeviceObjects );
graphics.DeviceResizing += new CancelEventHandler( this.EnvironmentResizing );
I note that in SlimDX.Direct3D9, DeviceLost no longer exists. I have a simialr problem with the others.
DeviceLost exists in the SlimDX.Direct3D9.ResultCode namespace, but I don't know if this will be of use.
Cheers,
You need to use the TestCooperativeLevel methods like you would in native DirectX to check the result code and act accordingly. The event handling method of MDX has some unfortunate performance pitfalls, which is why we avoided implementing that system.