mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 16:05:34 +00:00
Added UnLoad event handler.
This commit is contained in:
parent
87a23b654c
commit
437bf7946b
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue