Esempio n. 1
0
 /// <summary>
 /// This event will be fired immediately after the Direct3D device has
 /// been destroyed, which generally happens as a result of application termination or
 /// windowed/full screen toggles. Resources created in the OnCreateDevice event
 /// should be released here, which generally includes all Pool.Managed resources.
 /// </summary>
 private void OnDestroyDevice(object sender, EventArgs e)
 {
     // Update the direction widget
     DirectionWidget.OnDestroyDevice();
     if (mesh != null)
     {
         mesh.Dispose();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// This event will be fired immediately after the Direct3D device has
 /// been destroyed, which generally happens as a result of application termination or
 /// windowed/full screen toggles. Resources created in the OnCreateDevice event
 /// should be released here, which generally includes all Pool.Managed resources.
 /// </summary>
 private void OnDestroyDevice(object sender, EventArgs e)
 {
     // Update the direction widget
     DirectionWidget.OnDestroyDevice();
     if (nif != null)
     {
         nif.Dispose();
         nif           = null;
         nifPath       = null;
         currentSubset = -1;
     }
 }