diff options
Diffstat (limited to 'src/OpenTKGameWindow.cs')
| -rwxr-xr-x | src/OpenTKGameWindow.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index bc1ebda9..ff1ffeed 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -92,11 +92,13 @@ namespace go /// <summary> Remove all Graphic objects from top container </summary>
public void ClearInterface()
{
- foreach (GraphicObject g in GraphicObjects) {
+ int i = 0;
+ while (GraphicObjects.Count>0) {
+ GraphicObject g = GraphicObjects [i];
g.Visible = false;
g.ClearBinding ();
+ GraphicObjects.RemoveAt (0);
}
- GraphicObjects.Clear ();
}
public void Quit ()
{
|