/// <summary> /// Initialize the game's render pipeline. This has to be called in gameKernel.Initialize /// because that's where the spriteBatch has to be created. /// </summary> /// <param name="sb"></param> /// <param name="gd"></param> /// <param name="gdm"></param> internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm) { _RenderPipeline = new RenderPipeline(sb, gd, gdm); _DisplayManager = new DisplayManager( gameKernel, _RenderPipeline, GameConstants.BaseResolution, GameConstants.InitialWindowTitle, GameConstants.InitialBackgroundColour ); }
/// <summary> /// Required override of Monogame.Game.Initialize. Not actually part of the Artemis Engine. /// </summary> protected override sealed void Initialize() { base.Initialize(); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); _RenderPipeline = new RenderPipeline(spriteBatch, GraphicsDevice, graphics); _MultiformManager = new MultiformManager(); _GameTimer = new GlobalTimer(); _GameUpdater = new GlobalUpdater(); _Mouse = new MouseInput(); _Keyboard = new KeyboardInput(); }
internal DisplayManager( GameKernel game , RenderPipeline renderPipeline , Resolution baseResolution , string windowTitle , Color bgColor ) { this.game = game; this.graphicsDevice = renderPipeline.GraphicsDevice; this.graphicsManager = renderPipeline.GraphicsDeviceManager; this.spriteBatch = renderPipeline.SpriteBatch; window = game.Window; WindowResolution = baseResolution; WindowTitle = windowTitle; BackgroundColour = bgColor; ReinitDisplayProperties(true); }
internal DisplayManager(GameKernel game , RenderPipeline renderPipeline , Resolution baseResolution , string windowTitle , Color bgColor) { this.game = game; this.graphicsDevice = renderPipeline.GraphicsDevice; this.graphicsManager = renderPipeline.GraphicsDeviceManager; this.spriteBatch = renderPipeline.SpriteBatch; window = game.Window; WindowResolution = baseResolution; WindowTitle = windowTitle; BackgroundColour = bgColor; ReinitDisplayProperties(true); }
internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm) { _RenderPipeline = new RenderPipeline(sb, gd, gdm); }