Added UnLoad event handler.

This commit is contained in:
the_fiddler 2007-09-26 23:31:53 +00:00
parent 87a23b654c
commit 437bf7946b

View file

@ -135,6 +135,20 @@ void main()
#endregion
#region OnUnload
public override void OnUnload(EventArgs e)
{
if (shader_program != 0)
GL.DeleteProgram(shader_program);
if (fragment_shader_object != 0)
GL.DeleteShader(fragment_shader_object);
if (vertex_shader_object != 0)
GL.DeleteShader(vertex_shader_object);
}
#endregion
#region OnResize
/// <summary>
@ -231,18 +245,5 @@ void main()
}
#endregion
#region public override void Dispose()
public override void Dispose()
{
GL.DeleteProgram(shader_program);
GL.DeleteShader(fragment_shader_object);
GL.DeleteShader(vertex_shader_object);
base.Dispose();
}
#endregion
}
}