private void OnLostDevice() { if (!_engine.IsDisposed) { Texture.Dispose(); Surface.Dispose(); _rtsHelper?.OnLostDevice(); } }