public void Run() { WorldmapSector Sector = new WorldmapSector("worldmap.stwm"); bool running = true; float frames = 0; uint frameticks = SDL.GetTicks(); while(running) { Sdl.Event Event; while(SDL.PollEvent(out Event) > 0) { switch(Event.type) { case SDL.QUIT: running = false; break; case SDL.KEYDOWN: case SDL.KEYUP: Controller.HandleEvent(Event); if(Controller.WasPressed(Control.MENU)) running = false; break; } } Sector.Draw(); SDL.GL_SwapBuffers(); //SDL.Delay(10); Timer.Update(.01f); Sector.Update(.01f); frames++; uint ticks = SDL.GetTicks(); if(ticks - frameticks > 1000) { Console.WriteLine("FPS: " + frames); frames = 0; frameticks = ticks; } } }