DeleteTextures() public static method

This function deletes a set of Texture objects.
public static DeleteTextures ( int n, uint textures ) : void
n int Number of textures to delete.
textures uint The array containing the names of the textures to delete.
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Dispose managed and unmanaged resources of this instance.
        /// </summary>
        /// <param name="disposing">If disposing equals true, managed and unmanaged resources can be disposed. If disposing equals false, only unmanaged resources can be disposed. </param>
        private void Dispose(bool disposing)
        {
            if (this.disposedValue == false)
            {
                if (disposing)
                {
                    // Dispose managed resources.
                } // end if

                // Dispose unmanaged resources.
                {
                    OpenGL.DeleteTextures(this.id.Length, this.id);
                    this.id[0] = 0;
                }
                {
                    var disp = this.ImageFiller as IDisposable;
                    if (disp != null)
                    {
                        disp.Dispose();
                    }
                }
                // A sampler builder can be used in multiple textures.
                // Thus we shouldn't dispose it here.
                //{
                //    var disp = this.SamplerBuilder as IDisposable;
                //    if (disp != null) { disp.Dispose(); }
                //}
            } // end if

            this.disposedValue = true;
        } // end sub
Ejemplo n.º 2
0
        /// <summary>
        /// Dispose managed and unmanaged resources of this instance.
        /// </summary>
        /// <param name="disposing">If disposing equals true, managed and unmanaged resources can be disposed. If disposing equals false, only unmanaged resources can be disposed. </param>
        protected virtual void Dispose(bool disposing)
        {
            if (this.disposedValue == false)
            {
                if (disposing)
                {
                    // TODO: Dispose managed resources.
                } // end if

                // TODO: Dispose unmanaged resources.
                OpenGL.DeleteTextures(this.id.Length, this.id);
                this.id[0] = 0;
            } // end if

            this.disposedValue = true;
        } // end sub
Ejemplo n.º 3
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        void Dispose(Boolean disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                //Managed cleanup code here, while managed refs still valid
            }
            //Unmanaged cleanup code here
            var ids = new uint[] { FontTextureId, };

            OpenGL.DeleteTextures(ids.Length, ids);

            disposed = true;
        }
Ejemplo n.º 4
0
 internal void resize(int width, int height)
 {
     OpenGL.DeleteTextures(1, m_texture_id);
     setFormat(m_internalfmt, width, height, m_fmt, m_mipmap, m_interpol);
 }