示例#1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!IsDisposed)
            {
                if (disposing)
                {
                    // We're about to dispose, notify the application.
                    if (Disposing != null)
                    {
                        Disposing(this, EventArgs.Empty);
                    }

                    /* Dispose of all remaining graphics resources before
                     * disposing of the GraphicsDevice.
                     */
                    GraphicsResource.DisposeAll();

                    // Free all the cached shader programs.
                    programCache.Dispose();

                    // Dispose of the GL Device/Context
                    GLDevice.Dispose();
                }

                IsDisposed = true;
            }
        }
示例#2
0
 protected virtual void Dispose(bool disposing)
 {
     if (this._isDisposed)
     {
         return;
     }
     if (disposing)
     {
         GraphicsResource.DisposeAll();
         this._programCache.Dispose();
     }
     this._isDisposed = true;
 }
示例#3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)
                {
                    // Dispose of all remaining graphics resources before disposing of the graphics device
                    GraphicsResource.DisposeAll();

                    PlatformDispose();
                }

                _isDisposed = true;
            }
        }
示例#4
0
        protected virtual void Dispose(bool disposing)
        {
            if (!IsDisposed)
            {
                if (disposing)
                {
                    // Invoke the Disposing Event
                    OnDisposing();

                    // Dispose of all remaining graphics resources before disposing of the GraphicsDevice
                    GraphicsResource.DisposeAll();

                    // Free all the cached shader programs.
                    programCache.Dispose();
                }

                IsDisposed = true;
            }
        }
示例#5
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;
 }