protected override void OnLoad(EventArgs e)
        {
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();

            _stopwatch = new Stopwatch();
            _stopwatch.Start();

            _keyboardInputObservable.SubscribeKey(KeyCombination.LeftAlt && KeyCombination.Enter, CombinationDirection.Down, ToggleFullScren);

            _keyboardInputObservable.SubscribeKey(KeyCombination.Esc, CombinationDirection.Down, Exit);
            _keyboardInputObservable.SubscribeKey(KeyCombination.P, CombinationDirection.Down, () => _camera.Projection = ProjectionMode.Perspective);
            _keyboardInputObservable.SubscribeKey(KeyCombination.O, CombinationDirection.Down, () => _camera.Projection = ProjectionMode.Orthographic);
            _keyboardInputObservable.SubscribeKey(KeyCombination.F, CombinationDirection.Down, () => _synchronizeCameras = !_synchronizeCameras);

            _entityManager = new EntityManager();

            var terrainSystem = new TerrainSystem(FractalBrownianMotionSettings.Default);
            _systems = new List<IEntitySystem>
            {
                terrainSystem,
                new FreeCameraSystem(_keyboardInputProcessor, _mouseInputProcessor,_camera),
                new LightMoverSystem(),
                new OceanSystem(),
                new CubeMeshSystem(),
                new InputSystem(_keyboardInputProcessor)
                //new ChunkedLODSystem(_lodCamera),
                //new RenderSystem(_camera),
            };

            var light = new Entity(Guid.NewGuid().ToString());
            _entityManager.Add(light);
            _entityManager.AddComponentToEntity(light, new PositionalLightComponent { Position = new Vector3d(0, 20, 0) });
            _entityManager.AddComponentToEntity(light, new InputComponent(Key.J, Key.L, Key.M, Key.N, Key.U, Key.I));

            const int numberOfChunksX = 20;
            const int numberOfChunksY = 20;
            for (var i = 0; i < numberOfChunksX; i++)
            {
                for (var j = 0; j < numberOfChunksY; j++)
                {
                    var entity = new Entity(Guid.NewGuid().ToString());
                    _entityManager.Add(entity);
                    _entityManager.AddComponentToEntity(entity, new ChunkComponent(i, j));
                    _entityManager.AddComponentToEntity(entity, new StaticMesh());
                }
            }

            var settingsViewModel = new SettingsViewModel(new NoiseFactory.NoiseParameters());
            settingsViewModel.SettingsChanged += () =>
            {
                var settings = settingsViewModel.Assemble();
                terrainSystem.SetTerrainSettings(new NoiseFactory.RidgedMultiFractal().Create(settings));
            };

            _terrain = new Terrain(new ChunkedLod());
            _cube = new Cube();
        }
        protected override void OnLoad(EventArgs e)
        {
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();
            StartJobThread();

            _stopwatch = new Stopwatch();
            _stopwatch.Start();

            _keyboardInputObservable.SubscribeKey(KeyCombination.LeftAlt && KeyCombination.Enter, CombinationDirection.Down, ToggleFullScren);

            _keyboardInputObservable.SubscribeKey(KeyCombination.Esc, CombinationDirection.Down, Exit);
            _keyboardInputObservable.SubscribeKey(KeyCombination.P, CombinationDirection.Down, () => _camera.Projection  = ProjectionMode.Perspective);
            _keyboardInputObservable.SubscribeKey(KeyCombination.O, CombinationDirection.Down, () => _camera.Projection  = ProjectionMode.Orthographic);
            _keyboardInputObservable.SubscribeKey(KeyCombination.F, CombinationDirection.Down, () => _synchronizeCameras = !_synchronizeCameras);

            _entityManager = new EntityManager();

            var terrainSystem = new TerrainSystem(FractalBrownianMotionSettings.Default);

            _systems = new List <IEntitySystem>
            {
                terrainSystem,
                new FreeCameraSystem(_keyboardInputProcessor, _mouseInputProcessor, _camera),
                new LightMoverSystem(),
                new OceanSystem(),
                new CubeMeshSystem(),
                new InputSystem(_keyboardInputProcessor)
                //new ChunkedLODSystem(_lodCamera),
                //new RenderSystem(_camera),
            };

            var light = new Entity(Guid.NewGuid().ToString());

            _entityManager.Add(light);
            _entityManager.AddComponentToEntity(light, new PositionalLightComponent {
                Position = new Vector3d(0, 20, 0)
            });
            _entityManager.AddComponentToEntity(light, new InputComponent(Key.J, Key.L, Key.M, Key.N, Key.U, Key.I));

            const int numberOfChunksX = 20;
            const int numberOfChunksY = 20;

            for (var i = 0; i < numberOfChunksX; i++)
            {
                for (var j = 0; j < numberOfChunksY; j++)
                {
                    var entity = new Entity(Guid.NewGuid().ToString());
                    _entityManager.Add(entity);
                    _entityManager.AddComponentToEntity(entity, new ChunkComponent(i, j));
                    _entityManager.AddComponentToEntity(entity, new StaticMesh());
                }
            }

            var settingsViewModel = new SettingsViewModel(new NoiseFactory.NoiseParameters());

            settingsViewModel.SettingsChanged += () =>
            {
                var settings = settingsViewModel.Assemble();
                terrainSystem.SetTerrainSettings(new NoiseFactory.RidgedMultiFractal().Create(settings));
            };

            _terrain = new Terrain(new ChunkedLod());
            _cube    = new Cube();
        }