コード例 #1
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                // lock (GL.ThreadLock) // Cannot use an internal object!
                {
                    if (RT != null)
                    {
                        RT.Abort();
                    }

                    if (VertexBuffer != null)
                    {
                        VertexBuffer.Dispose();
                    }

                    if (NormalBuffer != null)
                    {
                        NormalBuffer.Dispose();
                    }

                    //  if (myTexture != null)
                    //     myTexture.Dispose();
                }
            }
            catch {
            }
        }
コード例 #2
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                mTimer?.Stop();
                mTimer?.Dispose();
                mComponents?.Dispose();
                mDefaultShader?.Dispose();
                mGridShader?.Dispose();
                mModel?.Dispose();
                mGridVertexBuffer?.Dispose();
            }

            GL.DeleteVertexArray(mGridVertexArrayId);
            base.Dispose(disposing);
        }
コード例 #3
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                mComponents?.Dispose();
                mDefaultShader?.Dispose();
                mGridShader?.Dispose();
                mModel?.Dispose();
                mGridVertexBuffer?.Dispose();

                Application.Idle -= OnApplicationIdle;
            }

            GL.DeleteVertexArray(mGridVertexArrayId);
            base.Dispose(disposing);
        }
コード例 #4
0
 private void glesControl1_OnDestroy()
 {
     GLES20.DeleteProgram(_program);
     _buffer.Dispose();
 }
コード例 #5
0
 public void Dispose()
 {
     _accelbuffer.Dispose();
 }
コード例 #6
0
 public void Dispose()
 {
     positionBuffer.Dispose();
     colorBuffer.Dispose();
 }
コード例 #7
0
 public void Dispose()
 {
     _vbo.Dispose();
 }