/// <summary> /// Called after the Game and GraphicsDevice are created, but before LoadContent. Reference page contains code sample. /// </summary> protected override void Initialize() { this.CalculatePixelAspectRatio(); DeferredRenderer deferredRenderer = new DeferredRenderer(this); GameStateManager gameStateManager = new GameStateManager(this); InputService inputService = new InputService(this); // Push the initial gamestate on to the stack gameStateManager.PushGameState(this.initialGameState); Components.Add(deferredRenderer); Components.Add(gameStateManager); Components.Add(inputService); Services.AddService(typeof(DeferredRenderer), deferredRenderer); Services.AddService(typeof(GameStateManager), gameStateManager); Services.AddService(typeof(InputService), inputService); base.Initialize(); }
public PointLightRenderingComponent(DeferredRenderer deferredRenderer) : base(deferredRenderer) { }
public DirectionalLightRenderingComponent(DeferredRenderer deferredRenderer) : base(deferredRenderer) { }
public RenderingComponent(DeferredRenderer deferredRenderer) { this.deferredRenderer = deferredRenderer; }