예제 #1
0
			protected override void dispose( bool disposeManagedResources )
			{
				if ( !IsDisposed )
				{
					if ( disposeManagedResources )
					{
						this.SwapChain.SafeDispose();
						this.SwapChain = null;

						this.BackBuffer.SafeDispose();
						this.BackBuffer = null;

						this.DepthBuffer.SafeDispose();
						this.DepthBuffer = null;
					}
				}

				base.dispose( disposeManagedResources );
			}
 private Result CreateAdditionalSwapChain(IntPtr devicePointer, PresentParameters presentParameters, out SwapChain swapChain)
 {
     try
     {
         this.Log.LogMethodSignatureTypesAndValues(devicePointer, presentParameters.PrintTypesNamesValues());
         this.GetOrCreateDevice(devicePointer);
         swapChain = new SwapChain(this.Device, presentParameters);
         this.SwapChains.Add(swapChain);
         return Result.Ok;
     }
     catch (SharpDXException ex)
     {
         Log.Warn(ex);
         swapChain = null;
         return ex.ResultCode;
     }
     catch (Exception ex)
     {
         this.Log.Fatal(ex);
         swapChain = null;
         return Result.UnexpectedFailure;
     }
 }