protected override void dispose( bool disposeManagedResources )
{
if ( !IsDisposed )
{
if ( disposeManagedResources )
{
if ( glContext != null ) // Do We Not Have A Rendering Context?
{
glContext.SetCurrent();
glContext.Dispose();
glContext = null;
}
if ( _window != null )
{
if ( fullScreen )
displayDevice.RestoreResolution();
_window.Close();
_window = null;
}
}
// There are no unmanaged resources to release, but
// if we add them, they need to be released here.
}
// If it is available, make the call to the
// base class's Dispose(Boolean) method
base.dispose( disposeManagedResources );
}