// Performs initialization of the XNA types required for the application. private void InitializeXnaApplication() { // Create the service provider Services = new AppServiceProvider(); // Add the SharedGraphicsDeviceManager to the Services as the IGraphicsDeviceService for the app foreach (object obj in ApplicationLifetimeObjects) { if (obj is IGraphicsDeviceService) { Services.AddService(typeof(IGraphicsDeviceService), obj); } } // Create the ContentManager so the application can load precompiled assets Content = new ContentManager(Services, "Content"); // Create a GameTimer to pump the XNA FrameworkDispatcher FrameworkDispatcherTimer = new GameTimer(); FrameworkDispatcherTimer.FrameAction += FrameworkDispatcherFrameAction; FrameworkDispatcherTimer.Start(); }
// Performs initialization of the XNA types required for the application. private void InitializeXnaApplication() { // Create the service provider Services = new AppServiceProvider(); // Add the SharedGraphicsDeviceManager to the Services as the IGraphicsDeviceService for the app foreach (object obj in ApplicationLifetimeObjects) { if (obj is IGraphicsDeviceService) Services.AddService(typeof(IGraphicsDeviceService), obj); } // Create the ContentManager so the application can load precompiled assets Content = new ContentManager(Services, "Content"); // Create a GameTimer to pump the XNA FrameworkDispatcher FrameworkDispatcherTimer = new GameTimer(); FrameworkDispatcherTimer.FrameAction += FrameworkDispatcherFrameAction; FrameworkDispatcherTimer.Start(); }