Ejemplo n.º 1
0
 internal void OnDeviceReset()
 {
     if (this.DeviceReset != null)
     {
         this.DeviceReset((object)this, EventArgs.Empty);
     }
     if (this.glRenderTargetFrameBuffer <= 0U)
     {
         return;
     }
     GraphicsExtensions.DeleteFramebuffers(1, ref this.glRenderTargetFrameBuffer);
     this.glRenderTargetFrameBuffer = 0U;
 }
Ejemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (this._isDisposed)
     {
         return;
     }
     if (disposing)
     {
         GraphicsResource.DisposeAll();
         this._programCache.Dispose();
         GraphicsDevice.AddDisposeAction((Action)(() =>
         {
             if (this.glRenderTargetFrameBuffer <= 0U)
             {
                 return;
             }
             GraphicsExtensions.DeleteFramebuffers(1, ref this.glRenderTargetFrameBuffer);
         }));
     }
     this._isDisposed = true;
 }