/// <summary> /// The Main CutlassEngine constructor /// </summary> public CutlassEngine(string windowTitle = "Cutlass Engine") { _GraphicsDeviceManager = new GraphicsDeviceManager(this); _ContentManager = new ContentManager(this.Services); _GraphicsDeviceManager.PreparingDeviceSettings += new EventHandler <PreparingDeviceSettingsEventArgs>(GraphicsDeviceManager_PreparingDeviceSettings); Window.Title = _WindowTitle = windowTitle; GameSettingsManager.Initialize(); //Initialize Resolution settings. ResolutionManager.Initialize(this, _GraphicsDeviceManager); //#if DEBUG //Disable vertical retrace to get highest framerates possible for //testing performance. _GraphicsDeviceManager.SynchronizeWithVerticalRetrace = false; //#endif //Demand to update as fast as possible, do not use fixed time steps. this.IsFixedTimeStep = false; //Init the Input component _Input = new Input(this); Components.Add(_Input); //Init the Font Manager component _FontManager = new FontManager(this); Components.Add(_FontManager); //Init the Texture Manager component _TextureManager = new TextureManager(this); Components.Add(_TextureManager); //Init the Sound Manager component _SoundManager = new SoundManager(this); Components.Add(_SoundManager); //Init the screen manager component. _ScreenManager = new ScreenManager(this); Components.Add(_ScreenManager); #if DEBUG //Init the FpsCounter _FpsCounter = new FpsCounter(this); Components.Add(_FpsCounter); #endif }