/// <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.
VertexArrayObject[] vaos = this.VertexArrayObjects;
if (vaos != null)
{
foreach (var vao in vaos)
{
vao.Dispose();
}
}
ShaderProgram program = this.Program;
if (program != null)
{
program.Dispose();
}
} // end if
this.disposedValue = true;
} // end sub