Artemis.Engine.ArtemisEngine.InitializeRenderPipeline C# (CSharp) Метод

InitializeRenderPipeline() приватный Метод

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
Результат void
        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
                );
        }

Usage 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);
        }