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 { } }
/// <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); }
/// <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); }
private void glesControl1_OnDestroy() { GLES20.DeleteProgram(_program); _buffer.Dispose(); }
public void Dispose() { _accelbuffer.Dispose(); }
public void Dispose() { positionBuffer.Dispose(); colorBuffer.Dispose(); }
public void Dispose() { _vbo.Dispose(); }