Ejemplo n.º 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;
            }
        }
Ejemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (this._isDisposed)
     {
         return;
     }
     if (disposing)
     {
         GraphicsResource.DisposeAll();
         this._programCache.Dispose();
     }
     this._isDisposed = true;
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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;
 }