InitializeRenderPipeline() private method

Initialize the game's render pipeline. This has to be called in gameKernel.Initialize because that's where the spriteBatch has to be created.
private InitializeRenderPipeline ( SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
gd GraphicsDevice
gdm GraphicsDeviceManager
return void
Example #1
0
        sealed protected override void Initialize()
        {
            base.Initialize();

            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Due to Monogame's stupidity, we have to create the spriteBatch here, and not in
            // the most logical location (GameKernel's constructor OR even better, WE shouldn't
            // have to create it at all), we have to initialize the render pipeline from here.

            engine.InitializeRenderPipeline(spriteBatch, GraphicsDevice, graphics);
        }